Add user source property to schema

This commit is contained in:
Johannes Zellner
2019-08-29 17:52:00 +02:00
parent b9efa8f445
commit 4b86311ab9
3 changed files with 19 additions and 1 deletions
@@ -0,0 +1,17 @@
'use strict';
exports.up = function(db, callback) {
db.runSql('ALTER TABLE users ADD COLUMN source VARCHAR(128) DEFAULT ""', function (error) {
if (error) return callback(error);
callback();
});
};
exports.down = function(db, callback) {
db.runSql('ALTER TABLE users DROP COLUMN source', function (error) {
if (error) console.error(error);
callback(error);
});
};