1
0
Fork 0
forked from alemi/upub

fix: datetime utc, also in likes

redo all migrations ehe
This commit is contained in:
əlemi 2024-03-23 04:40:39 +01:00
parent 490358e9ed
commit b90f7307bc
Signed by: alemi
GPG key ID: A4895B84D311642C
3 changed files with 4 additions and 1 deletions

View file

@ -19,6 +19,7 @@ impl MigrationTrait for Migration {
) )
.col(ColumnDef::new(Likes::Actor).string().not_null()) .col(ColumnDef::new(Likes::Actor).string().not_null())
.col(ColumnDef::new(Likes::Likes).string().not_null()) .col(ColumnDef::new(Likes::Likes).string().not_null())
.col(ColumnDef::new(Likes::Date).date_time().not_null())
.to_owned() .to_owned()
) )
.await?; .await?;
@ -64,6 +65,7 @@ enum Likes {
Id, Id,
Actor, Actor,
Likes, Likes,
Date,
} }
#[derive(DeriveIden)] #[derive(DeriveIden)]

View file

@ -7,6 +7,7 @@ pub struct Model {
pub id: i64, pub id: i64,
pub actor: String, pub actor: String,
pub likes: String, pub likes: String,
pub date: ChronoDateTimeUtc,
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]

View file

@ -7,7 +7,7 @@ pub struct Model {
pub id: i64, pub id: i64,
pub actor: String, pub actor: String,
pub shares: String, pub shares: String,
pub date: ChronoDateTime, pub date: ChronoDateTimeUtc,
} }
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]