fix!: eeehh need to rebuild db anyway coz sqlite

This commit is contained in:
əlemi 2024-06-06 18:48:21 +02:00
parent 485724701a
commit 1213947495
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 0 additions and 39 deletions

View file

@ -7,7 +7,6 @@ mod m20240524_000004_create_addressing_deliveries;
mod m20240524_000005_create_attachments_tags_mentions;
mod m20240529_000001_add_relation_unique_index;
mod m20240605_000001_add_jobs_table;
mod m20240606_000001_no_unique_index_on_job_activity;
pub struct Migrator;
@ -22,7 +21,6 @@ impl MigratorTrait for Migrator {
Box::new(m20240524_000005_create_attachments_tags_mentions::Migration),
Box::new(m20240529_000001_add_relation_unique_index::Migration),
Box::new(m20240605_000001_add_jobs_table::Migration),
Box::new(m20240606_000001_no_unique_index_on_job_activity::Migration),
]
}
}

View file

@ -1,37 +0,0 @@
use sea_orm_migration::prelude::*;
use crate::m20240605_000001_add_jobs_table::Jobs;
#[derive(DeriveMigrationName)]
pub struct Migration;
#[async_trait::async_trait]
impl MigrationTrait for Migration {
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
manager
.drop_index(
Index::drop()
.name("index-jobs-activity")
.table(Jobs::Table)
.to_owned()
)
.await?;
Ok(())
}
async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
manager
.create_index(
Index::create()
.unique()
.name("index-jobs-activity")
.table(Jobs::Table)
.col(Jobs::Activity)
.to_owned()
)
.await?;
Ok(())
}
}