diff --git a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/schema/LiquibaseChangeSetWriter.java b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/schema/LiquibaseChangeSetWriter.java index a2ee5093e46..fcefb3fd520 100644 --- a/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/schema/LiquibaseChangeSetWriter.java +++ b/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/schema/LiquibaseChangeSetWriter.java @@ -337,7 +337,7 @@ private SchemaDiff differenceOf(Database database) throws LiquibaseException { Tables existingTables = getLiquibaseModel(database); Stream> entities = mappingContext.getPersistentEntities().stream() .filter(schemaFilter); - Tables mappedEntities = Tables.from(entities, sqlTypeMapping, database.getDefaultCatalogName(), mappingContext); + Tables mappedEntities = Tables.from(entities, sqlTypeMapping, database.getDefaultSchemaName(), mappingContext); return SchemaDiff.diff(mappedEntities, existingTables, nameComparator); } @@ -463,7 +463,7 @@ private Tables getLiquibaseModel(Database targetDatabase) throws LiquibaseExcept continue; } - Table tableModel = new Table(table.getSchema().getCatalogName(), table.getName()); + Table tableModel = new Table(table.getSchema().getName(), table.getName()); List columns = table.getColumns();