From 165b54fbc5aac21a81c7d38c2ea1a38be86df3e9 Mon Sep 17 00:00:00 2001 From: mertmit Date: Tue, 12 Nov 2024 15:48:12 +0300 Subject: [PATCH] feat: button migration --- .../meta/migrations/v2/nc_066_ai_button.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 packages/nocodb/src/meta/migrations/v2/nc_066_ai_button.ts diff --git a/packages/nocodb/src/meta/migrations/v2/nc_066_ai_button.ts b/packages/nocodb/src/meta/migrations/v2/nc_066_ai_button.ts new file mode 100644 index 0000000000..156cf250de --- /dev/null +++ b/packages/nocodb/src/meta/migrations/v2/nc_066_ai_button.ts @@ -0,0 +1,20 @@ +import type { Knex } from 'knex'; +import { MetaTable } from '~/utils/globals'; + +const up = async (knex: Knex) => { + await knex.schema.alterTable(MetaTable.COL_BUTTON, (table) => { + table.string('fk_integration_id', 20); + table.string('model', 255); + table.text('output_column_ids'); + }); +}; + +const down = async (knex: Knex) => { + await knex.schema.alterTable(MetaTable.COL_BUTTON, (table) => { + table.dropColumn('fk_integration_id'); + table.dropColumn('model'); + table.dropColumn('output_column_ids'); + }); +}; + +export { up, down };