diff --git a/packages/backend/native-utils/crates/migration/src/m20230531_180824_stringvec.rs b/packages/backend/native-utils/crates/migration/src/m20230531_180824_stringvec.rs index d9c54fd745..e561e18d5c 100644 --- a/packages/backend/native-utils/crates/migration/src/m20230531_180824_stringvec.rs +++ b/packages/backend/native-utils/crates/migration/src/m20230531_180824_stringvec.rs @@ -16,13 +16,19 @@ pub struct Migration; impl MigrationTrait for Migration { async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager - .drop_table(Table::drop().table(Alias::new("reversi_game")).to_owned()) + .drop_table( + Table::drop() + .if_exists() + .table(ReversiGame::Table) + .to_owned(), + ) .await?; manager .drop_table( Table::drop() - .table(Alias::new("reversi_matching")) + .if_exists() + .table(ReversiMatching::Table) .to_owned(), ) .await?; @@ -379,6 +385,14 @@ enum Webhook { Id, On, } +#[derive(Iden)] +enum ReversiGame { + Table, +} +#[derive(Iden)] +enum ReversiMatching { + Table, +} fn select_query(table: T, id: T, col: T) -> String { Query::select()