|
|
@ -47,11 +47,21 @@ export default async function ({ ncMeta }: NcUpgraderCtx) { |
|
|
|
for (const _base of bases) { |
|
|
|
for (const _base of bases) { |
|
|
|
const base = new Base(_base); |
|
|
|
const base = new Base(_base); |
|
|
|
|
|
|
|
|
|
|
|
const isProjectDeleted = ( |
|
|
|
// skip if the prodect_id is missing
|
|
|
|
await ncMeta.metaGet2(null, null, MetaTable.PROJECT, { |
|
|
|
if (!base.project_id) { |
|
|
|
id: base.project_id, |
|
|
|
continue; |
|
|
|
}) |
|
|
|
} |
|
|
|
).deleted; |
|
|
|
|
|
|
|
|
|
|
|
const project = await ncMeta.metaGet2(null, null, MetaTable.PROJECT, { |
|
|
|
|
|
|
|
id: base.project_id, |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// skip if the project is missing
|
|
|
|
|
|
|
|
if (!project) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const isProjectDeleted = project.deleted; |
|
|
|
|
|
|
|
|
|
|
|
const knex: Knex = base.is_meta |
|
|
|
const knex: Knex = base.is_meta |
|
|
|
? ncMeta.knexConnection |
|
|
|
? ncMeta.knexConnection |
|
|
|