漏了一根索引上的deleteAt
This commit is contained in:
parent
5ab7e9e43b
commit
be10547065
|
|
@ -354,7 +354,7 @@ class MysqlStore extends CascadeStore_1.CascadeStore {
|
|||
};
|
||||
for (const attr in attributesNew) {
|
||||
if (attributes[attr]) {
|
||||
// 因为反向无法复原原来定义的attribute类型,这里就比较两次创建的sql是不是一致。
|
||||
// 因为反向无法复原原来定义的attribute类型,这里就比较两次创建的sql是不是一致,不是太好的设计。
|
||||
const sql1 = this.translator.translateAttributeDef(attr, attributesNew[attr]);
|
||||
const sql2 = this.translator.translateAttributeDef(attr, attributes[attr]);
|
||||
if (!this.translator.compareSql(sql1, sql2)) {
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ class SqlTranslator {
|
|||
name: `${entity}_trigger_uuid_auto_create`,
|
||||
attributes: [{
|
||||
name: types_1.TriggerUuidAttribute,
|
||||
}, {
|
||||
name: types_1.DeleteAtAttribute,
|
||||
}]
|
||||
},
|
||||
];
|
||||
|
|
@ -84,7 +86,7 @@ class SqlTranslator {
|
|||
attributes: [{
|
||||
name: attr,
|
||||
}, {
|
||||
name: '$$deleteAt$$',
|
||||
name: types_1.DeleteAtAttribute,
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
|
@ -100,7 +102,7 @@ class SqlTranslator {
|
|||
}, {
|
||||
name: 'entityId',
|
||||
}, {
|
||||
name: '$$deleteAt$$',
|
||||
name: types_1.DeleteAtAttribute,
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
|
@ -113,7 +115,7 @@ class SqlTranslator {
|
|||
attributes: [{
|
||||
name: attr,
|
||||
}, {
|
||||
name: '$$deleteAt$$',
|
||||
name: types_1.DeleteAtAttribute,
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
|
@ -129,7 +131,7 @@ class SqlTranslator {
|
|||
}, {
|
||||
name: 'expiresAt',
|
||||
}, {
|
||||
name: '$$deleteAt$$',
|
||||
name: types_1.DeleteAtAttribute,
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -391,7 +391,7 @@ export class MysqlStore<ED extends EntityDict & BaseEntityDict, Cxt extends Asyn
|
|||
};
|
||||
for (const attr in attributesNew) {
|
||||
if (attributes[attr]) {
|
||||
// 因为反向无法复原原来定义的attribute类型,这里就比较两次创建的sql是不是一致。
|
||||
// 因为反向无法复原原来定义的attribute类型,这里就比较两次创建的sql是不是一致,不是太好的设计。
|
||||
const sql1 = this.translator.translateAttributeDef(attr, attributesNew[attr]);
|
||||
const sql2 = this.translator.translateAttributeDef(attr, attributes[attr]);
|
||||
if (!this.translator.compareSql(sql1, sql2)) {
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ export abstract class SqlTranslator<ED extends EntityDict & BaseEntityDict> {
|
|||
name: `${entity}_trigger_uuid_auto_create`,
|
||||
attributes: [{
|
||||
name: TriggerUuidAttribute,
|
||||
}, {
|
||||
name: DeleteAtAttribute,
|
||||
}]
|
||||
},
|
||||
];
|
||||
|
|
@ -97,7 +99,7 @@ export abstract class SqlTranslator<ED extends EntityDict & BaseEntityDict> {
|
|||
attributes: [{
|
||||
name: attr,
|
||||
}, {
|
||||
name: '$$deleteAt$$',
|
||||
name: DeleteAtAttribute,
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
|
@ -116,7 +118,7 @@ export abstract class SqlTranslator<ED extends EntityDict & BaseEntityDict> {
|
|||
}, {
|
||||
name: 'entityId',
|
||||
}, {
|
||||
name: '$$deleteAt$$',
|
||||
name: DeleteAtAttribute,
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
|
@ -132,7 +134,7 @@ export abstract class SqlTranslator<ED extends EntityDict & BaseEntityDict> {
|
|||
attributes: [{
|
||||
name: attr,
|
||||
}, {
|
||||
name: '$$deleteAt$$',
|
||||
name: DeleteAtAttribute,
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
|
@ -151,7 +153,7 @@ export abstract class SqlTranslator<ED extends EntityDict & BaseEntityDict> {
|
|||
}, {
|
||||
name: 'expiresAt',
|
||||
}, {
|
||||
name: '$$deleteAt$$',
|
||||
name: DeleteAtAttribute,
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue