mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
e3cebb21c8
- Adds development and production environments. - Connects default environment to all projects - When creating a project connects the project to all enabled environments
23 lines
424 B
JavaScript
23 lines
424 B
JavaScript
exports.up = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
INSERT INTO project_environments(project_id, environment_name)
|
|
SELECT id, 'default'
|
|
FROM projects
|
|
ON CONFLICT DO NOTHING;
|
|
`,
|
|
cb,
|
|
);
|
|
};
|
|
|
|
exports.down = function (db, cb) {
|
|
db.runSql(
|
|
`
|
|
DELETE
|
|
FROM project_environments
|
|
WHERE environment_name = 'default';
|
|
`,
|
|
cb,
|
|
);
|
|
};
|