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:
parent
416b1ff658
commit
e79ca200a9
|
@ -604,9 +604,8 @@ public class MColumn extends X_AD_Column
|
||||||
if (getColumnName().equals(PO.getUUIDColumnName(tableName))) {
|
if (getColumnName().equals(PO.getUUIDColumnName(tableName))) {
|
||||||
StringBuilder indexName = new StringBuilder().append(getColumnName()).append("_idx");
|
StringBuilder indexName = new StringBuilder().append(getColumnName()).append("_idx");
|
||||||
if (indexName.length() > 30) {
|
if (indexName.length() > 30) {
|
||||||
int i = indexName.length() - 31;
|
indexName = new StringBuilder().append(getColumnName().substring(0, 25));
|
||||||
indexName = new StringBuilder().append(getColumnName().substring(0, getColumnName().length() - i));
|
indexName.append("uuidx");
|
||||||
indexName.append("_uu_idx");
|
|
||||||
}
|
}
|
||||||
StringBuilder msgreturn = new StringBuilder("CONSTRAINT ").append(indexName).append(" UNIQUE (").append(getColumnName()).append(")");
|
StringBuilder msgreturn = new StringBuilder("CONSTRAINT ").append(indexName).append(" UNIQUE (").append(getColumnName()).append(")");
|
||||||
return msgreturn.toString();
|
return msgreturn.toString();
|
||||||
|
|
Loading…
Reference in New Issue