diff --git a/src/migrations/m20240324_000001_add_addressing.rs b/src/migrations/m20240324_000001_add_addressing.rs index 32aac39..358a556 100644 --- a/src/migrations/m20240324_000001_add_addressing.rs +++ b/src/migrations/m20240324_000001_add_addressing.rs @@ -19,7 +19,7 @@ impl MigrationTrait for Migration { ) .col(ColumnDef::new(Addressing::Actor).string().not_null()) .col(ColumnDef::new(Addressing::Server).string().not_null()) - .col(ColumnDef::new(Addressing::Activity).string().not_null()) + .col(ColumnDef::new(Addressing::Activity).string().null()) .col(ColumnDef::new(Addressing::Object).string().null()) .col(ColumnDef::new(Addressing::Published).date_time().not_null()) .to_owned() diff --git a/src/migrations/m20240421_000001_make_addressed_activity_nullable.rs b/src/migrations/m20240421_000001_make_addressed_activity_nullable.rs deleted file mode 100644 index 74c4265..0000000 --- a/src/migrations/m20240421_000001_make_addressed_activity_nullable.rs +++ /dev/null @@ -1,48 +0,0 @@ -use sea_orm_migration::prelude::*; - -#[derive(DeriveMigrationName)] -pub struct Migration; - -#[async_trait::async_trait] -impl MigrationTrait for Migration { - async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(Addressing::Table) - .modify_column( - ColumnDef::new(Addressing::Activity) - .string() - .null() - ) - .to_owned() - ) - .await?; - - Ok(()) - } - - async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { - manager - .alter_table( - Table::alter() - .table(Addressing::Table) - .modify_column( - ColumnDef::new(Addressing::Activity) - .string() - .not_null() - .default("") - ) - .to_owned() - ) - .await?; - - Ok(()) - } -} - -#[derive(DeriveIden)] -enum Addressing { - Table, - Activity, -} diff --git a/src/migrations/mod.rs b/src/migrations/mod.rs index c80871d..19d6301 100644 --- a/src/migrations/mod.rs +++ b/src/migrations/mod.rs @@ -10,7 +10,6 @@ mod m20240324_000001_add_addressing; mod m20240325_000001_add_deliveries; mod m20240325_000002_add_system_key; mod m20240418_000001_add_statuses_and_reply_to; -mod m20240421_000001_make_addressed_activity_nullable; pub struct Migrator; @@ -28,7 +27,6 @@ impl MigratorTrait for Migrator { Box::new(m20240325_000001_add_deliveries::Migration), Box::new(m20240325_000002_add_system_key::Migration), Box::new(m20240418_000001_add_statuses_and_reply_to::Migration), - Box::new(m20240421_000001_make_addressed_activity_nullable::Migration), ] } }