Refactoring
This commit is contained in:
parent
6059cdd9ad
commit
4b1cac7f35
@ -132,8 +132,7 @@ pub async fn create_active_enum_table(db: &DbConn) -> Result<ExecResult, DbErr>
|
|||||||
.col(&mut tea_col)
|
.col(&mut tea_col)
|
||||||
.to_owned();
|
.to_owned();
|
||||||
|
|
||||||
match db_backend {
|
if db_backend = DbBackend::Postgres {
|
||||||
DbBackend::Postgres => {
|
|
||||||
let drop_type_stmt = Type::drop()
|
let drop_type_stmt = Type::drop()
|
||||||
.name(tea_enum.clone())
|
.name(tea_enum.clone())
|
||||||
.cascade()
|
.cascade()
|
||||||
@ -159,8 +158,6 @@ pub async fn create_active_enum_table(db: &DbConn) -> Result<ExecResult, DbErr>
|
|||||||
);
|
);
|
||||||
db.execute(stmt).await?;
|
db.execute(stmt).await?;
|
||||||
}
|
}
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
|
|
||||||
create_table(db, &stmt, ActiveEnum).await
|
create_table(db, &stmt, ActiveEnum).await
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user