diff --git a/migrations/20160419070047-apps-add-altDomain.js b/migrations/20160419070047-apps-add-altDomain.js new file mode 100644 index 000000000..4ef2d281a --- /dev/null +++ b/migrations/20160419070047-apps-add-altDomain.js @@ -0,0 +1,17 @@ +'use strict'; + +var dbm = dbm || require('db-migrate'); + +exports.up = function(db, callback) { + db.runSql('ALTER TABLE apps ADD COLUMN altDomain VARCHAR(256)', function (error) { + if (error) console.error(error); + callback(error); + }); +}; + +exports.down = function(db, callback) { + db.runSql('ALTER TABLE apps DROP COLUMN altDomain', function (error) { + if (error) console.error(error); + callback(error); + }); +}; diff --git a/migrations/schema.sql b/migrations/schema.sql index b5975c734..4e143d39c 100644 --- a/migrations/schema.sql +++ b/migrations/schema.sql @@ -65,6 +65,7 @@ CREATE TABLE IF NOT EXISTS apps( oauthProxy BOOLEAN DEFAULT 0, createdAt TIMESTAMP(2) NOT NULL DEFAULT CURRENT_TIMESTAMP, memoryLimit BIGINT DEFAULT 0, + altDomain VARCHAR(256), lastBackupId VARCHAR(128), lastBackupConfigJson TEXT, // used for appstore and non-appstore installs. it's here so it's easy to do REST validation