在建默认索引时的重命问题
This commit is contained in:
parent
b464df874a
commit
a1bca4292b
|
|
@ -104,7 +104,7 @@ var SqlTranslator = /** @class */ (function () {
|
||||||
if (attr.endsWith('State') && attributes[attr].type === 'varchar') {
|
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; }))) {
|
if (!(indexes === null || indexes === void 0 ? void 0 : indexes.find(function (ele) { return ele.attributes[0].name === attr; }))) {
|
||||||
intrinsticIndexes.push({
|
intrinsticIndexes.push({
|
||||||
name: "".concat(entity, "_attr_auto_create"),
|
name: "".concat(entity, "_").concat(attr, "_auto_create"),
|
||||||
attributes: [{
|
attributes: [{
|
||||||
name: attr,
|
name: attr,
|
||||||
}, {
|
}, {
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ export abstract class SqlTranslator<ED extends EntityDict> {
|
||||||
ele => ele.attributes[0].name === attr
|
ele => ele.attributes[0].name === attr
|
||||||
))) {
|
))) {
|
||||||
intrinsticIndexes.push({
|
intrinsticIndexes.push({
|
||||||
name: `${entity}_attr_auto_create`,
|
name: `${entity}_${attr}_auto_create`,
|
||||||
attributes: [{
|
attributes: [{
|
||||||
name: attr,
|
name: attr,
|
||||||
}, {
|
}, {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue