|
|
@@ -491,7 +491,7 @@ public class DatabaseUtil { |
|
|
|
if (SwEnum.IndexType.PK.value.equalsIgnoreCase(modelIndex.getType())) return null; |
|
|
|
SwEnum.IndexTypeBean type = SwEnum.IndexType.instance.getByValue(modelIndex.getType()); |
|
|
|
return "CREATE " + (SwEnum.IndexType.U.value.equalsIgnoreCase(modelIndex.getType()) ? SwEnum.IndexType.U.fullName : "") + |
|
|
|
" INDEX " + entity.getAbbr() + "_" + getDbIndexName(entity, modelIndex) + |
|
|
|
" INDEX " + getDbIndexName(entity, modelIndex) + |
|
|
|
" ON " + entity.getSchemaTableName() + " (" + modelIndex.getFields() + ")"; |
|
|
|
} |
|
|
|
|
|
|
@@ -551,6 +551,6 @@ public class DatabaseUtil { |
|
|
|
} |
|
|
|
|
|
|
|
private String getDbIndexName(ModelTable entity, ModelIndex modelIndex) { |
|
|
|
return entity.getAbbr() + "_" + modelIndex; |
|
|
|
return entity.getAbbr() + "_" + modelIndex.getName(); |
|
|
|
} |
|
|
|
} |