|
|
@ -77,17 +77,17 @@ async function upgradeModelRelations({ |
|
|
|
childTable: relation.tn, |
|
|
|
childTable: relation.tn, |
|
|
|
foreignKeyName: relation.cstn, |
|
|
|
foreignKeyName: relation.cstn, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// skip postgres since we were already creating the index while creating the relation
|
|
|
|
// skip postgres since we were already creating the index while creating the relation
|
|
|
|
if (ncMeta.knex.clientType() !== 'pg') { |
|
|
|
if (ncMeta.knex.clientType() !== 'pg') { |
|
|
|
// create a new index for the column
|
|
|
|
// create a new index for the column
|
|
|
|
const indexArgs = { |
|
|
|
const indexArgs = { |
|
|
|
columns: [relation.cn], |
|
|
|
columns: [relation.cn], |
|
|
|
tn: relation.tn, |
|
|
|
tn: relation.tn, |
|
|
|
non_unique: true, |
|
|
|
non_unique: true, |
|
|
|
}; |
|
|
|
}; |
|
|
|
await sqlClient.indexCreate(indexArgs); |
|
|
|
await sqlClient.indexCreate(indexArgs); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|