Skip to content
Browse files

Merge pull request #125 from vorbis/backingIndexFix

Mark backing index for primary key as handled as well.
  • Loading branch information...
2 parents 0078c55 + c6ffc10 commit 8660de7be99df8708e3a89a49075aaf35a672b6f @nvoxland nvoxland committed Apr 3, 2013
View
4 liquibase-core/src/main/java/liquibase/database/core/H2Database.java
@@ -231,4 +231,8 @@ public boolean supportsInitiallyDeferrableColumns() {
return false;
}
+ @Override
+ protected String getAutoIncrementClause() {
+ return "AUTO_INCREMENT";
+ }
}
View
7 ...-core/src/main/java/liquibase/diff/output/changelog/core/MissingTableChangeGenerator.java
@@ -76,17 +76,12 @@ public int getPriority(Class<? extends DatabaseObject> objectType, Database data
constraintsConfig.setPrimaryKeyName(primaryKey.getName());
}
control.setAlreadyHandledMissing(primaryKey);
+ control.setAlreadyHandledMissing(primaryKey.getBackingIndex());
} else if (column.isNullable() != null && !column.isNullable()) {
constraintsConfig = new ConstraintsConfig();
constraintsConfig.setNullable(false);
}
-// if (column.isUnique()) {
-// if (constraintsConfig == null) {
-// constraintsConfig = new ConstraintsConfig();
-// }
-// constraintsConfig.setUnique(true);
-// }
if (constraintsConfig != null) {
columnConfig.setConstraints(constraintsConfig);
}
View
6 ...ase-integration-tests/src/test/java/liquibase/dbtest/pgsql/PostgreSQLIntegrationTest.java
@@ -8,10 +8,4 @@
public PostgreSQLIntegrationTest() throws Exception {
super("pgsql", "jdbc:postgresql://"+ getDatabaseServerHostname("PostgreSQL") +"/liquibase");
}
-
- @Override
- @Test
- public void testRunChangeLog() throws Exception {
- super.testRunChangeLog(); //To change body of overridden methods use File | Settings | File Templates.
- }
}

0 comments on commit 8660de7

Please sign in to comment.
Something went wrong with that request. Please try again.