From 315e6bea4a5d1108bf573abbd9387acf2ef978e0 Mon Sep 17 00:00:00 2001 From: alemi Date: Fri, 7 Jun 2024 07:08:00 +0200 Subject: [PATCH] fix: ouch need to use this... --- ...000001_create_actor_activity_object_tables.rs | 16 ++++++++-------- ...40524_000002_create_relations_likes_shares.rs | 4 ++-- ...240524_000003_create_users_auth_and_config.rs | 2 +- ...240524_000004_create_addressing_deliveries.rs | 6 +++--- ...24_000005_create_attachments_tags_mentions.rs | 6 +++--- .../src/m20240605_000001_add_jobs_table.rs | 8 ++++---- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/upub/migrations/src/m20240524_000001_create_actor_activity_object_tables.rs b/upub/migrations/src/m20240524_000001_create_actor_activity_object_tables.rs index 1779337d..11dab352 100644 --- a/upub/migrations/src/m20240524_000001_create_actor_activity_object_tables.rs +++ b/upub/migrations/src/m20240524_000001_create_actor_activity_object_tables.rs @@ -109,11 +109,11 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Instances::Software).string().null()) .col(ColumnDef::new(Instances::Version).string().null()) .col(ColumnDef::new(Instances::Icon).string().null()) - .col(ColumnDef::new(Instances::DownSince).timestamp().null()) + .col(ColumnDef::new(Instances::DownSince).timestamp_with_time_zone().null()) .col(ColumnDef::new(Instances::Users).big_integer().null()) .col(ColumnDef::new(Instances::Posts).big_integer().null()) - .col(ColumnDef::new(Instances::Published).timestamp().not_null().default(Expr::current_timestamp())) - .col(ColumnDef::new(Instances::Updated).timestamp().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Instances::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Instances::Updated).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .to_owned() ) .await?; @@ -161,8 +161,8 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Actors::StatusesCount).integer().not_null().default(0)) .col(ColumnDef::new(Actors::PublicKey).string().not_null()) .col(ColumnDef::new(Actors::PrivateKey).string().null()) - .col(ColumnDef::new(Actors::Published).timestamp().not_null().default(Expr::current_timestamp())) - .col(ColumnDef::new(Actors::Updated).timestamp().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Actors::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Actors::Updated).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .to_owned() ) .await?; @@ -232,8 +232,8 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Objects::Bto).json().null()) .col(ColumnDef::new(Objects::Cc).json().null()) .col(ColumnDef::new(Objects::Bcc).json().null()) - .col(ColumnDef::new(Objects::Published).timestamp().not_null().default(Expr::current_timestamp())) - .col(ColumnDef::new(Objects::Updated).timestamp().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Objects::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Objects::Updated).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .to_owned() ).await?; @@ -290,7 +290,7 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Activities::Bto).json().null()) .col(ColumnDef::new(Activities::Cc).json().null()) .col(ColumnDef::new(Activities::Bcc).json().null()) - .col(ColumnDef::new(Activities::Published).timestamp().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Activities::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .to_owned() ).await?; diff --git a/upub/migrations/src/m20240524_000002_create_relations_likes_shares.rs b/upub/migrations/src/m20240524_000002_create_relations_likes_shares.rs index a6a71555..7c058f85 100644 --- a/upub/migrations/src/m20240524_000002_create_relations_likes_shares.rs +++ b/upub/migrations/src/m20240524_000002_create_relations_likes_shares.rs @@ -140,7 +140,7 @@ impl MigrationTrait for Migration { .on_update(ForeignKeyAction::Cascade) .on_delete(ForeignKeyAction::Cascade) ) - .col(ColumnDef::new(Likes::Published).timestamp().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Likes::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .to_owned() ) .await?; @@ -194,7 +194,7 @@ impl MigrationTrait for Migration { .on_update(ForeignKeyAction::Cascade) .on_delete(ForeignKeyAction::Cascade) ) - .col(ColumnDef::new(Announces::Published).timestamp().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Announces::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .to_owned() ) .await?; diff --git a/upub/migrations/src/m20240524_000003_create_users_auth_and_config.rs b/upub/migrations/src/m20240524_000003_create_users_auth_and_config.rs index 3d4b2264..0e11c9e3 100644 --- a/upub/migrations/src/m20240524_000003_create_users_auth_and_config.rs +++ b/upub/migrations/src/m20240524_000003_create_users_auth_and_config.rs @@ -129,7 +129,7 @@ impl MigrationTrait for Migration { .on_delete(ForeignKeyAction::Cascade) ) .col(ColumnDef::new(Sessions::Secret).string().not_null()) - .col(ColumnDef::new(Sessions::Expires).timestamp().not_null()) + .col(ColumnDef::new(Sessions::Expires).timestamp_with_time_zone().not_null()) .to_owned() ) .await?; diff --git a/upub/migrations/src/m20240524_000004_create_addressing_deliveries.rs b/upub/migrations/src/m20240524_000004_create_addressing_deliveries.rs index fff1a12e..e44b7f65 100644 --- a/upub/migrations/src/m20240524_000004_create_addressing_deliveries.rs +++ b/upub/migrations/src/m20240524_000004_create_addressing_deliveries.rs @@ -75,7 +75,7 @@ impl MigrationTrait for Migration { .to(Objects::Table, Objects::Internal) .on_update(ForeignKeyAction::Cascade) ) - .col(ColumnDef::new(Addressing::Published).timestamp().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Addressing::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .to_owned() ) .await?; @@ -141,8 +141,8 @@ impl MigrationTrait for Migration { .on_update(ForeignKeyAction::Cascade) .on_delete(ForeignKeyAction::Cascade) ) - .col(ColumnDef::new(Deliveries::Published).timestamp().not_null().default(Expr::current_timestamp())) - .col(ColumnDef::new(Deliveries::NotBefore).timestamp().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Deliveries::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Deliveries::NotBefore).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .col(ColumnDef::new(Deliveries::Attempt).integer().not_null().default(0)) .to_owned() ) diff --git a/upub/migrations/src/m20240524_000005_create_attachments_tags_mentions.rs b/upub/migrations/src/m20240524_000005_create_attachments_tags_mentions.rs index 0221cabe..225cbc79 100644 --- a/upub/migrations/src/m20240524_000005_create_attachments_tags_mentions.rs +++ b/upub/migrations/src/m20240524_000005_create_attachments_tags_mentions.rs @@ -63,7 +63,7 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Attachments::DocumentType).string().not_null()) .col(ColumnDef::new(Attachments::Name).string().null()) .col(ColumnDef::new(Attachments::MediaType).string().not_null()) - .col(ColumnDef::new(Attachments::Published).timestamp().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Attachments::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .to_owned() ) .await?; @@ -102,7 +102,7 @@ impl MigrationTrait for Migration { // .on_update(ForeignKeyAction::Cascade) // .on_delete(ForeignKeyAction::Cascade) // ) - .col(ColumnDef::new(Mentions::Published).timestamp().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Mentions::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .to_owned() ) .await?; @@ -144,7 +144,7 @@ impl MigrationTrait for Migration { .on_delete(ForeignKeyAction::Cascade) ) .col(ColumnDef::new(Hashtags::Name).string().not_null()) - .col(ColumnDef::new(Hashtags::Published).timestamp().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Hashtags::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .to_owned() ) .await?; diff --git a/upub/migrations/src/m20240605_000001_add_jobs_table.rs b/upub/migrations/src/m20240605_000001_add_jobs_table.rs index 561d8044..9aabbc4b 100644 --- a/upub/migrations/src/m20240605_000001_add_jobs_table.rs +++ b/upub/migrations/src/m20240605_000001_add_jobs_table.rs @@ -45,8 +45,8 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Jobs::Target).string().null()) .col(ColumnDef::new(Jobs::Activity).string().not_null()) .col(ColumnDef::new(Jobs::Payload).string().null()) - .col(ColumnDef::new(Jobs::Published).timestamp().not_null().default(Expr::current_timestamp())) - .col(ColumnDef::new(Jobs::NotBefore).timestamp().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Jobs::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Jobs::NotBefore).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .col(ColumnDef::new(Jobs::Attempt).small_integer().not_null().default(0)) .to_owned() ) @@ -101,8 +101,8 @@ impl MigrationTrait for Migration { .on_update(ForeignKeyAction::Cascade) .on_delete(ForeignKeyAction::Cascade) ) - .col(ColumnDef::new(Deliveries::Published).timestamp().not_null().default(Expr::current_timestamp())) - .col(ColumnDef::new(Deliveries::NotBefore).timestamp().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Deliveries::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) + .col(ColumnDef::new(Deliveries::NotBefore).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .col(ColumnDef::new(Deliveries::Attempt).integer().not_null().default(0)) .to_owned() )