Files
cloudron-box/migrations/20190111214233-tasks-rename-result-to-resultJson.js
Johannes Zellner 2ec89d6a20 Fix typo
2019-01-19 12:24:04 +01:00

17 lines
504 B
JavaScript

'use strict';
exports.up = function(db, callback) {
db.runSql('ALTER TABLE tasks CHANGE result resultJson TEXT', [], function (error) {
if (error) console.error(error);
db.runSql('DELETE FROM tasks', callback); // empty tasks table since we have bad results format
});
};
exports.down = function(db, callback) {
db.runSql('ALTER TABLE tasks CHANGE resultJson result TEXT', [], function (error) {
if (error) console.error(error);
callback(error);
});
};