提交 88fcdf0f authored 作者: christian.peter.io's avatar christian.peter.io

When opening older databases, an index already exists exception could occur

上级 30a48bfa
...@@ -65,7 +65,7 @@ public class CreateIndex extends SchemaCommand { ...@@ -65,7 +65,7 @@ public class CreateIndex extends SchemaCommand {
int id = getObjectId(true, false); int id = getObjectId(true, false);
if (indexName == null) { if (indexName == null) {
if (primaryKey) { if (primaryKey) {
indexName = table.getSchema().getUniqueIndexName(session, table, Constants.PREFIX_PRIMARY_KEY); indexName = table.getSchema().getUniqueIndexName(session, table, Constants.PREFIX_PRIMARY_KEY + "AUTO_");
} else { } else {
indexName = table.getSchema().getUniqueIndexName(session, table, Constants.PREFIX_INDEX); indexName = table.getSchema().getUniqueIndexName(session, table, Constants.PREFIX_INDEX);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论