Fix migrations

This commit is contained in:
2024-12-02 12:19:33 +01:00
parent 5d4963594a
commit 99257c8553

View File

@@ -213,7 +213,8 @@ public abstract class BaseMigration implements MigrationModelInterface {
}
protected void dropTable(String tableName) throws SQLException, IOException {
String dropSql = "DROP TABLE " + tableName;
String dropSql = "IF EXISTS (SELECT * FROM SYSOBJECTS WHERE id = object_id('" + tableName + "'))\r\n" +
"DROP TABLE " + tableName;
executeStatement(dropSql);
}