Skip to content
Permalink
Browse files

0003815: Create tables with a source foreign key in a non default

catalog and/or schema to a target with default catalog/schema
  • Loading branch information...
jumpmind-josh committed Dec 3, 2018
1 parent c2b3b7f commit 96440056471204e04ac9d5c32b5af87a5f2476bd
Showing with 11 additions and 0 deletions.
  1. +11 −0 symmetric-db/src/main/java/org/jumpmind/db/model/Table.java
@@ -154,9 +154,15 @@ public String getCatalog() {
* The catalog
*/
public void setCatalog(String catalog) {
for (ForeignKey fk : getForeignKeys()) {
if (fk.getForeignTableCatalog() != null && fk.getForeignTableCatalog().equals(this.catalog)) {
fk.setForeignTableCatalog(catalog);
}
}
this.oldCatalog = this.catalog != null ? this.catalog : catalog;
this.catalog = catalog;
this.fullyQualifiedTableName = this.fullyQualifiedTableNameLowerCase = null;

}

/**
@@ -175,6 +181,11 @@ public String getSchema() {
* The schema
*/
public void setSchema(String schema) {
for (ForeignKey fk : getForeignKeys()) {
if (fk.getForeignTableSchema() != null && fk.getForeignTableSchema().equals(this.schema)) {
fk.setForeignTableSchema(schema);
}
}
this.oldSchema = this.schema != null ? this.schema : schema;
this.schema = schema;
this.fullyQualifiedTableName = this.fullyQualifiedTableNameLowerCase = null;

0 comments on commit 9644005

Please sign in to comment.
You can’t perform that action at this time.