Skip to content

Commit

Permalink
ColumnSnapshotGeneratorHana, improved priority evaluation, restrictin…
Browse files Browse the repository at this point in the history
…g to HanaDatabase
  • Loading branch information
tgehrsitz-ite committed May 16, 2024
1 parent 89e2f59 commit 5b408ce
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package liquibase.ext.hana.snapshot;

import liquibase.database.Database;
import liquibase.ext.hana.HanaDatabase;
import liquibase.snapshot.CachedRow;
import liquibase.snapshot.SnapshotGenerator;
import liquibase.snapshot.jvm.ColumnSnapshotGenerator;
Expand All @@ -12,7 +13,14 @@ public class ColumnSnapshotGeneratorHana extends ColumnSnapshotGenerator {

@Override
public int getPriority(Class<? extends DatabaseObject> objectType, Database database) {
return PRIORITY_DATABASE;
if (!(database instanceof HanaDatabase)) {
return PRIORITY_NONE;
}
int priority = super.getPriority(objectType, database);
if (priority > PRIORITY_NONE) {
priority += PRIORITY_DATABASE;
}
return priority;
}

@Override
Expand Down

0 comments on commit 5b408ce

Please sign in to comment.