diff --git a/packages/nocodb/src/version-upgrader/ncDateTimeUpgrader.ts b/packages/nocodb/src/version-upgrader/ncDateTimeUpgrader.ts index e2be9fb259..e84de4bfdb 100644 --- a/packages/nocodb/src/version-upgrader/ncDateTimeUpgrader.ts +++ b/packages/nocodb/src/version-upgrader/ncDateTimeUpgrader.ts @@ -113,6 +113,12 @@ export default async function ({ ncMeta }: NcUpgraderCtx) { .filter((c) => c.pk) .map((c) => c.column_name); + // disable triggers for pg / mssql + if (knex.clientType() === 'pg' || knex.clientType() === 'mssql') { + // TODO: get triggerList from client + // TODO: disable trigger + } + const records = await knex(getTnPath(knex, model)).select(); for (const record of records) { @@ -163,6 +169,12 @@ export default async function ({ ncMeta }: NcUpgraderCtx) { // throw general error throw e; } + } finally { + // enable triggers for pg / mssql back + if (knex.clientType() === 'pg' || knex.clientType() === 'mssql') { + // TODO: get triggerList from client + // TODO: enable trigger + } } } }