Skip to content

Commit

Permalink
Fix 4.24.0 protected methods changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
filipelautert committed Oct 4, 2023
1 parent fb7c332 commit f3a8c0d
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import liquibase.database.Database;
import liquibase.ext.maxdb.database.MaxDBDatabase;
import liquibase.snapshot.jvm.SequenceSnapshotGenerator;
import liquibase.statement.SqlStatement;
import liquibase.statement.core.RawSqlStatement;
import liquibase.structure.DatabaseObject;
import liquibase.structure.core.Schema;

Expand All @@ -17,7 +19,10 @@ public int getPriority(Class<? extends DatabaseObject> objectType, Database data
}

@Override
protected String getSelectSequenceSql(Schema schema, Database database) {
return "SELECT SEQUENCE_NAME FROM DOMAIN.SEQUENCES WHERE OWNER = '" + schema.getName() + "'";
protected SqlStatement getSelectSequenceStatement(Schema schema, Database database) {
if (database instanceof MaxDBDatabase) {
return new RawSqlStatement("SELECT SEQUENCE_NAME FROM DOMAIN.SEQUENCES WHERE OWNER = '" + schema.getName() + "'");
}
return super.getSelectSequenceStatement(schema, database);
}
}

0 comments on commit f3a8c0d

Please sign in to comment.