|
|
|
@ -44,6 +44,11 @@ async function upgradeModelRelations({
|
|
|
|
|
ncMeta, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// if colOptions not found then skip
|
|
|
|
|
if (!colOptions) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
switch (colOptions.type) { |
|
|
|
|
case RelationTypes.HAS_MANY: |
|
|
|
|
{ |
|
|
|
@ -77,7 +82,6 @@ async function upgradeModelRelations({
|
|
|
|
|
childTable: relation.tn, |
|
|
|
|
foreignKeyName: relation.cstn, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// skip postgres since we were already creating the index while creating the relation
|
|
|
|
|
if (ncMeta.knex.clientType() !== 'pg') { |
|
|
|
@ -90,6 +94,7 @@ async function upgradeModelRelations({
|
|
|
|
|
await sqlClient.indexCreate(indexArgs); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|