diff --git a/migrations/20151013073519-apps-add-oauthProxy.js b/migrations/20151013073519-apps-add-oauthProxy.js new file mode 100644 index 000000000..05de51dcc --- /dev/null +++ b/migrations/20151013073519-apps-add-oauthProxy.js @@ -0,0 +1,17 @@ +dbm = dbm || require('db-migrate'); +var type = dbm.dataType; + +exports.up = function(db, callback) { + db.runSql('ALTER TABLE apps ADD COLUMN oauthProxy BOOLEAN DEFAULT 0', function (error) { + if (error) console.error(error); + callback(error); + }); +}; + +exports.down = function(db, callback) { + db.runSql('ALTER TABLE apps DROP COLUMN oauthProxy', function (error) { + if (error) console.error(error); + callback(error); + }); +}; + diff --git a/migrations/schema.sql b/migrations/schema.sql index 862e271c9..581e49868 100644 --- a/migrations/schema.sql +++ b/migrations/schema.sql @@ -49,6 +49,7 @@ CREATE TABLE IF NOT EXISTS apps( location VARCHAR(128) NOT NULL UNIQUE, dnsRecordId VARCHAR(512), accessRestriction VARCHAR(512), + oauthProxy BOOLEAN DEFAULT 0, createdAt TIMESTAMP(2) NOT NULL DEFAULT CURRENT_TIMESTAMP, lastBackupId VARCHAR(128),