mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-22 15:10:02 +00:00
Postgres DDL - With Postgres table partitioning, add partition column to primary key
- Postgres DDL generation - Using table partitioning - There is a primary key defined that doesn't contain the partition column In DDL generation, automatically add the partition column to the DB primary key.
This commit is contained in:
1 parent
4f3c9adf6f
commit
7fbc1f8111
9 files changed
+305
-40
No files matched your search
@@ -16,11 +16,17 @@ public final class PartitionMeta {
|
||||
return mode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Originally the property name but replaced with the db column.
|
||||
*/
|
||||
public String getProperty() {
|
||||
return property;
|
||||
}
|
||||
|
||||
public void setProperty(String dbColumn) {
|
||||
/**
|
||||
* Set the db column being partitioned on.
|
||||
*/
|
||||
public void setColumn(String dbColumn) {
|
||||
this.property = dbColumn;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -249,12 +249,12 @@ public class DeployBeanDescriptor<T> {
|
||||
if (partitionMeta != null) {
|
||||
DeployBeanProperty beanProperty = getBeanProperty(partitionMeta.getProperty());
|
||||
if (beanProperty != null) {
|
||||
partitionMeta.setProperty(beanProperty.getDbColumn());
|
||||
partitionMeta.setColumn(beanProperty.getDbColumn());
|
||||
}
|
||||
}
|
||||
return partitionMeta;
|
||||
}
|
||||
|
||||
|
||||
public void setTablespaceMeta(TablespaceMeta tablespaceMeta) {
|
||||
this.tablespaceMeta = tablespaceMeta;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user