From 1c274eb2b1f35696b5ae4ed733fe3229ef3f5683 Mon Sep 17 00:00:00 2001 From: Wesley Willard Date: Tue, 1 Oct 2024 06:25:11 -0500 Subject: [PATCH] DAT-18730 (#257) Make sure the database is Redshift --- .../ext/redshift/snapshot/ForeignKeySnapshotGenerator.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/liquibase/ext/redshift/snapshot/ForeignKeySnapshotGenerator.java b/src/main/java/liquibase/ext/redshift/snapshot/ForeignKeySnapshotGenerator.java index 839e670..969b19b 100644 --- a/src/main/java/liquibase/ext/redshift/snapshot/ForeignKeySnapshotGenerator.java +++ b/src/main/java/liquibase/ext/redshift/snapshot/ForeignKeySnapshotGenerator.java @@ -6,11 +6,15 @@ import liquibase.snapshot.InvalidExampleException; import liquibase.snapshot.SnapshotGenerator; import liquibase.structure.DatabaseObject; +import liquibase.ext.redshift.database.RedshiftDatabase; public class ForeignKeySnapshotGenerator extends liquibase.snapshot.jvm.ForeignKeySnapshotGenerator { @Override public int getPriority(Class objectType, Database database) { - return PRIORITY_DATABASE; + if (database instanceof RedshiftDatabase) { + return PRIORITY_DATABASE; + } + return PRIORITY_NONE; } @Override