Skip to content

Commit

Permalink
Merge pull request #80 from liquibase/fix_4_24_0
Browse files Browse the repository at this point in the history
Fix 4.24.0 protected methods changes
  • Loading branch information
filipelautert authored Oct 4, 2023
2 parents fb7c332 + f3a8c0d commit ef6ed7d
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 ef6ed7d

Please sign in to comment.