IDEMPIERE-965 the create table process must also create the unique index for the UU column when found - fix issue with oracle index names longer than 30 char

This commit is contained in:
Carlos Ruiz 2015-05-06 12:03:01 -05:00
parent 416b1ff658
commit e79ca200a9
1 changed files with 2 additions and 3 deletions

View File

@ -604,9 +604,8 @@ public class MColumn extends X_AD_Column
if (getColumnName().equals(PO.getUUIDColumnName(tableName))) {
StringBuilder indexName = new StringBuilder().append(getColumnName()).append("_idx");
if (indexName.length() > 30) {
int i = indexName.length() - 31;
indexName = new StringBuilder().append(getColumnName().substring(0, getColumnName().length() - i));
indexName.append("_uu_idx");
indexName = new StringBuilder().append(getColumnName().substring(0, 25));
indexName.append("uuidx");
}
StringBuilder msgreturn = new StringBuilder("CONSTRAINT ").append(indexName).append(" UNIQUE (").append(getColumnName()).append(")");
return msgreturn.toString();