diff --git a/packages/nocodb/src/lib/migrations/v2/nc_013_sync_source.ts b/packages/nocodb/src/lib/migrations/v2/nc_013_sync_source.ts index 638eab0eec..b61dd5ffb2 100644 --- a/packages/nocodb/src/lib/migrations/v2/nc_013_sync_source.ts +++ b/packages/nocodb/src/lib/migrations/v2/nc_013_sync_source.ts @@ -17,7 +17,7 @@ const up = async (knex: Knex) => { table.string('project_id', 128); table.foreign('project_id').references(`${MetaTable.PROJECT}.id`); - table.string('fk_user_id', 128); + table.string('fk_user_id', 20); table.foreign('fk_user_id').references(`${MetaTable.USERS}.id`); table.timestamps(true, true); diff --git a/packages/nocodb/src/lib/migrations/v2/nc_016_alter_hooklog_payload_types.ts b/packages/nocodb/src/lib/migrations/v2/nc_016_alter_hooklog_payload_types.ts index 31126be296..3fc5ce872f 100644 --- a/packages/nocodb/src/lib/migrations/v2/nc_016_alter_hooklog_payload_types.ts +++ b/packages/nocodb/src/lib/migrations/v2/nc_016_alter_hooklog_payload_types.ts @@ -2,7 +2,14 @@ import Knex from 'knex'; import { MetaTable } from '../../utils/globals'; const up = async (knex: Knex) => { - if (knex.client.config.client !== 'sqlite3') { + if (knex.client.config.client === 'mssql') { + await knex.schema.alterTable(MetaTable.HOOK_LOGS, table => { + table.dropColumn('payload'); + }); + await knex.schema.alterTable(MetaTable.HOOK_LOGS, table => { + table.text('payload'); + }); + } else if (knex.client.config.client !== 'sqlite3') { await knex.schema.alterTable(MetaTable.HOOK_LOGS, table => { table.text('payload').alter(); });