mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
4b7e1f4a81
Our testing and internal validation has proven that the :global: environment concept confuses people more than the problems it solves. We have thus decided to group all configuration that was created before the environment concept was introduced in to the "default environment. This would still make everything work as before in addition to introducing the env concept. Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
21 lines
457 B
JavaScript
21 lines
457 B
JavaScript
'use strict';
|
|
|
|
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
UPDATE api_tokens SET environment = 'default' WHERE environment = ':global:';
|
|
UPDATE api_tokens SET environment = 'default' WHERE type='client' AND environment is null;
|
|
`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
UPDATE api_tokens SET environment = null WHERE type='client' AND environment = 'default';
|
|
`,
|
|
cb,
|
|
);
|
|
};
|