From 9578cd27dd3f483a3281bf61e49a7f1e530ab4b1 Mon Sep 17 00:00:00 2001 From: Faruk AYDIN Date: Tue, 16 Jul 2024 15:51:16 +0200 Subject: [PATCH] fix: Remove step contraint down migration --- .../20220105151725_remove_constraints_from_steps.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/db/migrations/20220105151725_remove_constraints_from_steps.js b/packages/backend/src/db/migrations/20220105151725_remove_constraints_from_steps.js index f4812f22..bffa24fc 100644 --- a/packages/backend/src/db/migrations/20220105151725_remove_constraints_from_steps.js +++ b/packages/backend/src/db/migrations/20220105151725_remove_constraints_from_steps.js @@ -5,9 +5,11 @@ export async function up(knex) { }); } -export async function down(knex) { - return knex.schema.alterTable('steps', (table) => { - table.string('key').notNullable().alter(); - table.string('app_key').notNullable().alter(); - }); +export async function down() { + // We can't use down migration here since there are null values which needs to be set! + // We don't want to set those values by default key and app key since it will mislead users. + // return knex.schema.alterTable('steps', (table) => { + // table.string('key').notNullable().alter(); + // table.string('app_key').notNullable().alter(); + // }); }