From 87b0d3927d583d080787afb2b928f199c189ca71 Mon Sep 17 00:00:00 2001 From: Quentin Lebouc Date: Wed, 4 Dec 2024 10:25:10 +0100 Subject: [PATCH] feat(api): alter profile rewards type and id types --- ...0241204091429_alter-profile-rewards-columns.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 api/db/migrations/20241204091429_alter-profile-rewards-columns.js diff --git a/api/db/migrations/20241204091429_alter-profile-rewards-columns.js b/api/db/migrations/20241204091429_alter-profile-rewards-columns.js new file mode 100644 index 00000000000..6fc9cc535df --- /dev/null +++ b/api/db/migrations/20241204091429_alter-profile-rewards-columns.js @@ -0,0 +1,15 @@ +const TABLE_NAME = 'profile-rewards'; + +const up = async function (knex) { + await knex.schema.alterTable(TABLE_NAME, function (table) { + table.bigInteger('rewardId').notNullable().alter(); + }); +}; + +const down = async function (knex) { + await knex.schema.alterTable(TABLE_NAME, function (table) { + table.string('rewardId').notNullable().alter(); + }); +}; + +export { down, up };