去掉了unique索引的建立

This commit is contained in:
Xu Chang 2023-01-31 17:02:33 +08:00
parent ef301533dc
commit a6ca13e963
2 changed files with 6 additions and 4 deletions

View File

@ -301,10 +301,11 @@ var MySqlTranslator = /** @class */ (function (_super) {
indexes.forEach(function (_a, idx) {
var name = _a.name, attributes = _a.attributes, config = _a.config;
var _b = config || {}, unique = _b.unique, type = _b.type, parser = _b.parser;
if (unique) {
// 因为有deleteAt的存在这里的unique没意义只能框架自己去建立checker来处理
/* if (unique) {
sql += ' unique ';
}
else if (type === 'fulltext') {
else */ if (type === 'fulltext') {
sql += ' fulltext ';
}
else if (type === 'spatial') {

View File

@ -494,10 +494,11 @@ export class MySqlTranslator<ED extends EntityDict> extends SqlTranslator<ED> {
indexes.forEach(
({ name, attributes, config }, idx) => {
const { unique, type, parser } = config || {};
if (unique) {
// 因为有deleteAt的存在这里的unique没意义只能框架自己去建立checker来处理
/* if (unique) {
sql += ' unique ';
}
else if (type === 'fulltext') {
else */ if (type === 'fulltext') {
sql += ' fulltext ';
}
else if (type === 'spatial') {