Browse Source

refactor: include project name as well

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/6311/head
Pranav C 1 year ago
parent
commit
d85874f6a4
  1. 13
      packages/nocodb/src/version-upgrader/ncXcdbLTARIndexUpgrader.ts

13
packages/nocodb/src/version-upgrader/ncXcdbLTARIndexUpgrader.ts

@ -90,9 +90,6 @@ async function upgradeBaseRelations({
ncMeta: MetaService;
base: Base;
}) {
// skip deleted projects
if ((await base.getProject(ncMeta)).deleted) return;
const sqlClient = await NcConnectionMgrv2.getSqlClient(base, ncMeta.knex);
// get models for the base
@ -144,21 +141,25 @@ export default async function ({ ncMeta }: NcUpgraderCtx) {
// iterate and upgrade each base
for (const _base of bases) {
const base = new Base(_base)
const base = new Base(_base);
// skip if not pg, since for other db we don't need to upgrade
if (ncMeta.knex.clientType() !== 'pg') {
continue;
}
const project = await base.getProject(ncMeta);
// skip deleted projects
if (!project || project.deleted) continue;
logger.log(`Upgrading base '${base.alias}'`);
logger.log(`Upgrading base '${base.alias}'(${project.title})`);
await upgradeBaseRelations({
ncMeta,
base,
});
logger.log(`Upgraded base '${base.alias}'`);
logger.log(`Upgraded base '${base.alias}'(${project.title})`);
}
logger.log(

Loading…
Cancel
Save