Cool! For me, it was working with 3.0.2 with the same database
Here's the diff between 3.0.2 and 3.0.3 for that class
- git diff liquibase-parent-3.0.2 liquibase-parent-3.0.3 liquibase-core/src/main/java/liquibase/snapshot/jvm/ForeignKeySnapshotGenerator.java
- diff --git a/liquibase-core/src/main/java/liquibase/snapshot/jvm/ForeignKeySnapshotGenerator.java b/liquibase-core/src/main/java/liquibase/snapshot/jvm/ForeignKeySnapshotGenerator.
- index b8a87e9..8f9335f 100644
- --- a/liquibase-core/src/main/java/liquibase/snapshot/jvm/ForeignKeySnapshotGenerator.java
- +++ b/liquibase-core/src/main/java/liquibase/snapshot/jvm/ForeignKeySnapshotGenerator.java
- @@ -165,9 +165,11 @@ public class ForeignKeySnapshotGenerator extends JdbcSnapshotGenerator {
- continue;
- }
- - Index exampleIndex = new Index().setTable(foreignKey.getForeignKeyTable());
- - exampleIndex.getColumns().addAll(Arrays.asList(foreignKey.getForeignKeyColumns().split("\\s*,\\s*")));
- - foreignKey.setBackingIndex(exampleIndex);
- + if (database.createsIndexesForForeignKeys()) {
- + Index exampleIndex = new Index().setTable(foreignKey.getForeignKeyTable());
- + exampleIndex.getColumns().addAll(Arrays.asList(foreignKey.getForeignKeyColumns().split("\\s*,\\s*")));
- + foreignKey.setBackingIndex(exampleIndex);
- + }
- return foreignKey;
- }