From ea754147ebbf1bc266c4951afdffb80c1f7f6d19 Mon Sep 17 00:00:00 2001 From: Geoffroy Begouaussel Date: Fri, 4 Oct 2024 11:26:13 +0200 Subject: [PATCH] tech(api): add migration to delete user has-seen-level-seven-info column --- ...234_remove-has-seen-level-seven-info-column.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 api/db/migrations/20241004090234_remove-has-seen-level-seven-info-column.js diff --git a/api/db/migrations/20241004090234_remove-has-seen-level-seven-info-column.js b/api/db/migrations/20241004090234_remove-has-seen-level-seven-info-column.js new file mode 100644 index 00000000000..a342644900e --- /dev/null +++ b/api/db/migrations/20241004090234_remove-has-seen-level-seven-info-column.js @@ -0,0 +1,15 @@ +const TABLE_NAME = 'users'; +const COLUMN_NAME = 'hasSeenLevelSevenInfo'; + +const up = async function (knex) { + await knex.schema.table(TABLE_NAME, function (table) { + table.dropColumn(COLUMN_NAME); + }); +}; + +const down = async function (knex) { + await knex.schema.table(TABLE_NAME, function (table) { + table.boolean(COLUMN_NAME).defaultTo(false); + }); +}; +export { down, up };