Skip to content

Commit

Permalink
add db migration to v3.7.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles committed Mar 3, 2018
1 parent f1475cf commit becc980
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/core/task/task.dbMigration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

0 comments on commit becc980

Please sign in to comment.