diff --git a/migrations/20161111051640-appdb-add-sso.js b/migrations/20161111051640-appdb-add-sso.js new file mode 100644 index 000000000..fe96dc6d1 --- /dev/null +++ b/migrations/20161111051640-appdb-add-sso.js @@ -0,0 +1,16 @@ +var dbm = global.dbm || require('db-migrate'); +var type = dbm.dataType; + +exports.up = function(db, callback) { + db.runSql('ALTER TABLE apps ADD COLUMN sso BOOLEAN DEFAULT 1', function (error) { + if (error) console.error(error); + callback(error); + }); +}; + +exports.down = function(db, callback) { + db.runSql('ALTER TABLE apps DROP COLUMN sso', function (error) { + if (error) console.error(error); + callback(error); + }); +}; diff --git a/migrations/schema.sql b/migrations/schema.sql index 2b7a7908e..a7226fb70 100644 --- a/migrations/schema.sql +++ b/migrations/schema.sql @@ -68,6 +68,7 @@ CREATE TABLE IF NOT EXISTS apps( memoryLimit BIGINT DEFAULT 0, altDomain VARCHAR(256), xFrameOptions VARCHAR(512), + sso BOOLEAN DEFAULT 1, // whether user chose to enable SSO lastBackupId VARCHAR(128), // tracks last valid backup, can be removed