mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: add default sort order for built in envs (#1076)
This commit is contained in:
parent
b04b6b3ef7
commit
59f1c6e8e9
@ -3,9 +3,9 @@
|
||||
exports.up = function (db, cb) {
|
||||
db.runSql(
|
||||
`
|
||||
INSERT INTO environments(name, type, enabled)
|
||||
VALUES ('development', 'development', true),
|
||||
('production', 'production', true);
|
||||
INSERT INTO environments(name, type, enabled, sort_order)
|
||||
VALUES ('development', 'development', true, 100),
|
||||
('production', 'production', true, 200);
|
||||
`,
|
||||
cb,
|
||||
);
|
||||
|
15
src/migrations/20211029094324-set-sort-order-env.js
Normal file
15
src/migrations/20211029094324-set-sort-order-env.js
Normal file
@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
exports.up = function (db, cb) {
|
||||
db.runSql(
|
||||
`
|
||||
UPDATE environments set sort_order = 100 where name = 'development' AND sort_order = 9999;
|
||||
UPDATE environments set sort_order = 200 where name = 'production' AND sort_order = 9999;
|
||||
`,
|
||||
cb,
|
||||
);
|
||||
};
|
||||
|
||||
exports.down = function (db, cb) {
|
||||
cb();
|
||||
};
|
Loading…
Reference in New Issue
Block a user