Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Mar 19, 2024
1 parent 4950817 commit d069ba6
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions sea-orm-migration/src/migrator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,20 +165,12 @@ pub trait MigratorTrait: Send {
{
let builder = db.get_database_backend();
let table_name = Self::migration_table_name();
let table = table_name.to_string();
let schema = Schema::new(builder);
let mut stmt = schema
.create_table_from_entity(seaql_migrations::Entity)
.table_name(table_name);
stmt.if_not_exists();

let has_table = crate::has_table(db, None, table).await?;

if has_table {
Ok(())
} else {
db.execute(builder.build(&stmt)).await.map(|_| ())
}
db.execute(builder.build(&stmt)).await.map(|_| ())
}

/// Check the status of all migrations
Expand Down

0 comments on commit d069ba6

Please sign in to comment.