Skip to content

Commit 749ce92

Browse files
committed
Replaced all usage of catalog with schema.
Catalog was used by mistake. Spring Data JDBC has no support for multiple catalogs, only for multiple schema. Closes #1729
1 parent 7187255 commit 749ce92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/core/mapping/schema/LiquibaseChangeSetWriter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ private SchemaDiff differenceOf(Database database) throws LiquibaseException {
336336
Tables existingTables = getLiquibaseModel(database);
337337
Stream<? extends RelationalPersistentEntity<?>> entities = mappingContext.getPersistentEntities().stream()
338338
.filter(schemaFilter);
339-
Tables mappedEntities = Tables.from(entities, sqlTypeMapping, database.getDefaultCatalogName(), mappingContext);
339+
Tables mappedEntities = Tables.from(entities, sqlTypeMapping, database.getDefaultSchemaName(), mappingContext);
340340

341341
return SchemaDiff.diff(mappedEntities, existingTables, nameComparator);
342342
}
@@ -462,7 +462,7 @@ private Tables getLiquibaseModel(Database targetDatabase) throws LiquibaseExcept
462462
continue;
463463
}
464464

465-
Table tableModel = new Table(table.getSchema().getCatalogName(), table.getName());
465+
Table tableModel = new Table(table.getSchema().getName(), table.getName());
466466

467467
List<liquibase.structure.core.Column> columns = table.getColumns();
468468

0 commit comments

Comments
 (0)