mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
26c9d53b89
- Adding, updating and renaming environments are meant to be enterprise only features, as such, this PR moves these operations out of this server - We still keep sortOrder updating, toggling on/off and getting one, getting all, so we can still work with environments in the OSS version as well. Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai> Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
23 lines
406 B
JavaScript
23 lines
406 B
JavaScript
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
ALTER TABLE environments ADD COLUMN protected BOOLEAN DEFAULT false;
|
|
UPDATE environments SET protected = true WHERE name = ':global:';
|
|
`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
ALTER TABLE environments DROP COLUMN protected;
|
|
`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports._meta = {
|
|
version: 1,
|
|
};
|