fix: ouch need to use this...

This commit is contained in:
əlemi 2024-06-07 07:08:00 +02:00
parent 3883f2c31f
commit 315e6bea4a
Signed by: alemi
GPG key ID: A4895B84D311642C
6 changed files with 21 additions and 21 deletions

View file

@ -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?;

View file

@ -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?;

View file

@ -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?;

View file

@ -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()
)

View file

@ -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?;

View file

@ -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()
)