From 272c288d82025a201dbb8c265772e74f491ec528 Mon Sep 17 00:00:00 2001 From: Mihajlo Pavlovic Date: Thu, 26 Dec 2024 15:37:08 +0100 Subject: [PATCH 1/2] Add prune commands table migration --- .../sequelize/migrations/20241226151800-prune-commands.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/modules/repository/implementation/sequelize/migrations/20241226151800-prune-commands.js diff --git a/src/modules/repository/implementation/sequelize/migrations/20241226151800-prune-commands.js b/src/modules/repository/implementation/sequelize/migrations/20241226151800-prune-commands.js new file mode 100644 index 0000000000..e69de29bb2 From 1626119d808c4e89f739ee28dab0133bbaec2053 Mon Sep 17 00:00:00 2001 From: Mihajlo Pavlovic Date: Thu, 26 Dec 2024 16:09:22 +0100 Subject: [PATCH 2/2] Actualy push the migration --- .../sequelize/migrations/20241226151800-prune-commands.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/repository/implementation/sequelize/migrations/20241226151800-prune-commands.js b/src/modules/repository/implementation/sequelize/migrations/20241226151800-prune-commands.js index e69de29bb2..a3e487bff9 100644 --- a/src/modules/repository/implementation/sequelize/migrations/20241226151800-prune-commands.js +++ b/src/modules/repository/implementation/sequelize/migrations/20241226151800-prune-commands.js @@ -0,0 +1,7 @@ +export async function up({ context: { queryInterface } }) { + await queryInterface.sequelize.query('TRUNCATE TABLE commands;'); +} + +export async function down() { + // No need to do anything in the down method for truncation +}