From becc9807ec0405f85b282ab4905d096f77f83930 Mon Sep 17 00:00:00 2001 From: Pierre-Gilles Leymarie Date: Sat, 3 Mar 2018 19:37:29 +0100 Subject: [PATCH] add db migration to v3.7.8 --- api/core/task/task.dbMigration.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/core/task/task.dbMigration.js b/api/core/task/task.dbMigration.js index 783a74d7b4..b10eaf975e 100644 --- a/api/core/task/task.dbMigration.js +++ b/api/core/task/task.dbMigration.js @@ -40,6 +40,11 @@ module.exports = function(oldVersion) { .then(() => gladys.task.dbMigration('3.7.5')); } + if(semver.lt(oldVersion, '3.7.8')) { + return gladys.utils.sql(`ALTER TABLE alarm ADD COLUMN isWakeUp tinyint(1) DEFAULT NULL;`).reflect() + .then(() => gladys.task.dbMigration('3.7.8')) + } + // default, we save in DB the current version of Gladys return gladys.task.updateDbVersion(gladys.version); }; \ No newline at end of file