1
0
Fork 0
forked from alemi/upub

fix!: OOOOOPPSSSS use jsonb

This commit is contained in:
əlemi 2024-06-08 06:25:55 +02:00
parent 1fd31bc7be
commit a35ff4832f
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -228,10 +228,10 @@ impl MigrationTrait for Migration {
.col(ColumnDef::new(Objects::Announces).integer().not_null().default(0)) .col(ColumnDef::new(Objects::Announces).integer().not_null().default(0))
.col(ColumnDef::new(Objects::Replies).integer().not_null().default(0)) .col(ColumnDef::new(Objects::Replies).integer().not_null().default(0))
.col(ColumnDef::new(Objects::Context).string().null()) .col(ColumnDef::new(Objects::Context).string().null())
.col(ColumnDef::new(Objects::To).json().null()) .col(ColumnDef::new(Objects::To).json_binary().null())
.col(ColumnDef::new(Objects::Bto).json().null()) .col(ColumnDef::new(Objects::Bto).json_binary().null())
.col(ColumnDef::new(Objects::Cc).json().null()) .col(ColumnDef::new(Objects::Cc).json_binary().null())
.col(ColumnDef::new(Objects::Bcc).json().null()) .col(ColumnDef::new(Objects::Bcc).json_binary().null())
.col(ColumnDef::new(Objects::Published).timestamp_with_time_zone().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())) .col(ColumnDef::new(Objects::Updated).timestamp_with_time_zone().not_null().default(Expr::current_timestamp()))
.to_owned() .to_owned()
@ -286,10 +286,10 @@ impl MigrationTrait for Migration {
// .on_update(ForeignKeyAction::Cascade) // .on_update(ForeignKeyAction::Cascade)
// ) // )
.col(ColumnDef::new(Activities::Target).string().null()) .col(ColumnDef::new(Activities::Target).string().null())
.col(ColumnDef::new(Activities::To).json().null()) .col(ColumnDef::new(Activities::To).json_binary().null())
.col(ColumnDef::new(Activities::Bto).json().null()) .col(ColumnDef::new(Activities::Bto).json_binary().null())
.col(ColumnDef::new(Activities::Cc).json().null()) .col(ColumnDef::new(Activities::Cc).json_binary().null())
.col(ColumnDef::new(Activities::Bcc).json().null()) .col(ColumnDef::new(Activities::Bcc).json_binary().null())
.col(ColumnDef::new(Activities::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp())) .col(ColumnDef::new(Activities::Published).timestamp_with_time_zone().not_null().default(Expr::current_timestamp()))
.to_owned() .to_owned()
).await?; ).await?;