From b825286e95bb2e405cc0ace2a6fce71cd75d2ffe Mon Sep 17 00:00:00 2001 From: romain22222 Date: Tue, 17 Oct 2023 22:10:11 +0200 Subject: [PATCH] fix: migration functions uses database name --- src/core/database/game/GameDatabaseUtils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/database/game/GameDatabaseUtils.ts b/src/core/database/game/GameDatabaseUtils.ts index 230214bc9..500b17ad0 100644 --- a/src/core/database/game/GameDatabaseUtils.ts +++ b/src/core/database/game/GameDatabaseUtils.ts @@ -4,8 +4,8 @@ import {QueryInterface} from "sequelize"; * Add a mission to the campaign */ export async function addCampaignMission(context: QueryInterface, position: number): Promise { - await context.sequelize.query(`UPDATE draftbot_game.player_missions_info SET campaignProgression = campaignProgression + 1 WHERE campaignProgression > ${position}`); - await context.sequelize.query(`UPDATE draftbot_game.player_missions_info SET campaignBlob = CONCAT(SUBSTR(campaignBlob, 1, ${position - 1}), "0", SUBSTR(campaignBlob, ${position}))`); + await context.sequelize.query(`UPDATE player_missions_info SET campaignProgression = campaignProgression + 1 WHERE campaignProgression > ${position}`); + await context.sequelize.query(`UPDATE player_missions_info SET campaignBlob = CONCAT(SUBSTR(campaignBlob, 1, ${position - 1}), "0", SUBSTR(campaignBlob, ${position}))`); } /** @@ -21,8 +21,8 @@ export async function addCampaignMissionList(context: QueryInterface, positions: * Remove a mission from the campaign */ export async function removeCampaignMission(context: QueryInterface, position: number): Promise { - await context.sequelize.query(`UPDATE draftbot_game.player_missions_info SET campaignProgression = campaignProgression - 1 WHERE campaignProgression >= ${position}`); - await context.sequelize.query(`UPDATE draftbot_game.player_missions_info SET campaignBlob = CONCAT(SUBSTR(campaignBlob, 1, ${position - 1}), SUBSTR(campaignBlob, ${position + 1}))`); + await context.sequelize.query(`UPDATE player_missions_info SET campaignProgression = campaignProgression - 1 WHERE campaignProgression >= ${position}`); + await context.sequelize.query(`UPDATE player_missions_info SET campaignBlob = CONCAT(SUBSTR(campaignBlob, 1, ${position - 1}), SUBSTR(campaignBlob, ${position + 1}))`); } /**