UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

29 lines 1.63 kB
/* eslint camelcase: "off" */ 'use strict'; const async = require('async'); exports.up = function (db, cb) { async.series([ db.createTable.bind(db, 'feature_types', { id: { type: 'string', length: 255, primaryKey: true, notNull: true, }, name: { type: 'string', notNull: true }, description: { type: 'string' }, lifetime_days: { type: 'int' }, }), db.runSql.bind(db, ` INSERT INTO feature_types(id, name, description, lifetime_days) VALUES('release', 'Release', 'Used to enable trunk-based development for teams practicing Continuous Delivery.', 40); INSERT INTO feature_types(id, name, description, lifetime_days) VALUES('experiment', 'Experiment', 'Used to perform multivariate or A/B testing.', 40); INSERT INTO feature_types(id, name, description, lifetime_days) VALUES('operational', 'Operational', 'Used to control operational aspects of the system behavior.', 7); INSERT INTO feature_types(id, name, description, lifetime_days) VALUES('kill-switch', 'Kill switch', 'Used to to gracefully degrade system functionality.', null); INSERT INTO feature_types(id, name, description, lifetime_days) VALUES('permission', 'Permission', 'Used to change the features or product experience that certain users receive.', null); `), ], cb); }; exports.down = function (db, cb) { return db.dropTable('feature_types', cb); }; //# sourceMappingURL=20200805091409-add-feature-toggle-type.js.map