fix bug 2pack not creating primary key on tables - tested in oracle
still not working in postgres because of convert issues
This commit is contained in:
parent
4abc5e5d08
commit
61d057576d
|
@ -274,6 +274,12 @@ public class MColumn extends X_AD_Column
|
||||||
StringBuffer sql = new StringBuffer ("ALTER TABLE ")
|
StringBuffer sql = new StringBuffer ("ALTER TABLE ")
|
||||||
.append(table.getTableName())
|
.append(table.getTableName())
|
||||||
.append(" ADD ").append(getSQLDDL());
|
.append(" ADD ").append(getSQLDDL());
|
||||||
|
String constraint = getConstraint(table.getTableName());
|
||||||
|
if (constraint != null && constraint.length() > 0) {
|
||||||
|
sql.append("; ").append("ALTER TABLE ")
|
||||||
|
.append(table.getTableName())
|
||||||
|
.append(" ADD ").append(constraint);
|
||||||
|
}
|
||||||
return sql.toString();
|
return sql.toString();
|
||||||
} // getSQLAdd
|
} // getSQLAdd
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue