Files
cloudron-box/migrations/20170119185310-appdb-add-readonlyRootfs.js
T
Girish Ramakrishnan 7ef6bd0d3f Add readonlyRootfs flag to apps table
When turned off, it will put the app in a writable rootfs. This
allows us to debug live/production apps (like change start.sh) and
just get them up and running. Once turned off, this app cannot be
updated anymore (unless the force flag is set). This way we can
then update it using the CLI if we are convinced that the upcoming
update fixes the problem.

Part of #171
2017-01-19 11:55:25 -08:00

16 lines
447 B
JavaScript

dbm = dbm || require('db-migrate');
exports.up = function(db, callback) {
db.runSql('ALTER TABLE apps ADD COLUMN readonlyRootfs BOOLEAN DEFAULT 1', function (error) {
if (error) console.error(error);
callback(error);
});
};
exports.down = function(db, callback) {
db.runSql('ALTER TABLE apps DROP COLUMN readonlyRootfs', function (error) {
if (error) console.error(error);
callback(error);
});
};