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:
Carlos Ruiz 2007-02-26 04:15:10 +00:00
parent 4abc5e5d08
commit 61d057576d
1 changed files with 6 additions and 0 deletions

View File

@ -274,6 +274,12 @@ public class MColumn extends X_AD_Column
StringBuffer sql = new StringBuffer ("ALTER TABLE ")
.append(table.getTableName())
.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();
} // getSQLAdd