Don't run the database updater if the version is higher than current

This commit is contained in:
Calvin Montgomery 2014-06-07 10:46:44 -07:00
parent 5d5bdfc069
commit 6adba2f355
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,9 @@ module.exports.checkVersion = function () {
});
} else {
var v = parseInt(rows[0].value);
if (v >= DB_VERSION) {
return;
}
var next = function () {
if (v < DB_VERSION) {
update(v++, next);