Browse Source

fix: skip index creation for postgres

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5816/head
Pranav C 2 years ago
parent
commit
4707611093
  1. 17
      packages/nocodb/src/version-upgrader/ncXcdbLTARUpgrader.ts

17
packages/nocodb/src/version-upgrader/ncXcdbLTARUpgrader.ts

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

Loading…
Cancel
Save