在建默认索引时的重命问题

This commit is contained in:
Xu Chang 2023-02-01 14:40:02 +08:00
parent b464df874a
commit a1bca4292b
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ var SqlTranslator = /** @class */ (function () {
if (attr.endsWith('State') && attributes[attr].type === 'varchar') {
if (!(indexes === null || indexes === void 0 ? void 0 : indexes.find(function (ele) { return ele.attributes[0].name === attr; }))) {
intrinsticIndexes.push({
name: "".concat(entity, "_attr_auto_create"),
name: "".concat(entity, "_").concat(attr, "_auto_create"),
attributes: [{
name: attr,
}, {

View File

@ -118,7 +118,7 @@ export abstract class SqlTranslator<ED extends EntityDict> {
ele => ele.attributes[0].name === attr
))) {
intrinsticIndexes.push({
name: `${entity}_attr_auto_create`,
name: `${entity}_${attr}_auto_create`,
attributes: [{
name: attr,
}, {