mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#2694 - Postgres DDL - For Postgres table partitioning, remove the "suppressPrimaryKeyOnPartition" mode
This commit is contained in:
+1
-3
@@ -216,9 +216,7 @@ public class BaseTableDdl implements TableDdl {
|
||||
writeCompoundUniqueConstraints(apply, createTable);
|
||||
if (!pk.isEmpty()) {
|
||||
// defined on the columns
|
||||
if (partitionMode == null || !platformDdl.suppressPrimaryKeyOnPartition()) {
|
||||
writePrimaryKeyConstraint(apply, createTable.getPkName(), toColumnNames(pk));
|
||||
}
|
||||
writePrimaryKeyConstraint(apply, createTable.getPkName(), toColumnNames(pk));
|
||||
}
|
||||
if (platformDdl.isInlineForeignKeys()) {
|
||||
writeInlineForeignKeys(apply, createTable);
|
||||
|
||||
-4
@@ -732,10 +732,6 @@ public class PlatformDdl {
|
||||
return createTable;
|
||||
}
|
||||
|
||||
public boolean suppressPrimaryKeyOnPartition() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void addTablePartition(DdlBuffer apply, String partitionMode, String partitionColumn) {
|
||||
// only supported by postgres initially
|
||||
}
|
||||
|
||||
-5
@@ -30,11 +30,6 @@ public class PostgresDdl extends PlatformDdl {
|
||||
return "set lock_timeout = " + (lockTimeoutSeconds * 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean suppressPrimaryKeyOnPartition() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String convertArrayType(String logicalArrayType) {
|
||||
return NativeDbArray.logicalToNative(logicalArrayType);
|
||||
|
||||
Reference in New Issue
Block a user