去掉了unique索引的建立
This commit is contained in:
parent
ef301533dc
commit
a6ca13e963
|
|
@ -301,10 +301,11 @@ var MySqlTranslator = /** @class */ (function (_super) {
|
||||||
indexes.forEach(function (_a, idx) {
|
indexes.forEach(function (_a, idx) {
|
||||||
var name = _a.name, attributes = _a.attributes, config = _a.config;
|
var name = _a.name, attributes = _a.attributes, config = _a.config;
|
||||||
var _b = config || {}, unique = _b.unique, type = _b.type, parser = _b.parser;
|
var _b = config || {}, unique = _b.unique, type = _b.type, parser = _b.parser;
|
||||||
if (unique) {
|
// 因为有deleteAt的存在,这里的unique没意义,只能框架自己去建立checker来处理
|
||||||
|
/* if (unique) {
|
||||||
sql += ' unique ';
|
sql += ' unique ';
|
||||||
}
|
}
|
||||||
else if (type === 'fulltext') {
|
else */ if (type === 'fulltext') {
|
||||||
sql += ' fulltext ';
|
sql += ' fulltext ';
|
||||||
}
|
}
|
||||||
else if (type === 'spatial') {
|
else if (type === 'spatial') {
|
||||||
|
|
|
||||||
|
|
@ -494,10 +494,11 @@ export class MySqlTranslator<ED extends EntityDict> extends SqlTranslator<ED> {
|
||||||
indexes.forEach(
|
indexes.forEach(
|
||||||
({ name, attributes, config }, idx) => {
|
({ name, attributes, config }, idx) => {
|
||||||
const { unique, type, parser } = config || {};
|
const { unique, type, parser } = config || {};
|
||||||
if (unique) {
|
// 因为有deleteAt的存在,这里的unique没意义,只能框架自己去建立checker来处理
|
||||||
|
/* if (unique) {
|
||||||
sql += ' unique ';
|
sql += ' unique ';
|
||||||
}
|
}
|
||||||
else if (type === 'fulltext') {
|
else */ if (type === 'fulltext') {
|
||||||
sql += ' fulltext ';
|
sql += ' fulltext ';
|
||||||
}
|
}
|
||||||
else if (type === 'spatial') {
|
else if (type === 'spatial') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue