some prep work to allow for checking of dependency versions. Also updated upgrade.check behaviour to send back error if schema is out of date, instead of no error and "false".

This commit is contained in:
Julian Lam
2015-07-06 15:44:52 -04:00
parent da1c347fc2
commit 1069f9c936
2 changed files with 24 additions and 13 deletions

View File

@@ -34,12 +34,13 @@ Upgrade.check = function(callback) {
if (err) {
return callback(err);
}
callback(null, true);
callback(null);
});
return;
}
callback(null, parseInt(value, 10) >= latestSchema);
var schema_ok = parseInt(value, 10) >= latestSchema;
callback(!schema_ok ? new Error('schema-out-of-date') : null);
});
};