-
-
Notifications
You must be signed in to change notification settings - Fork 730
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rename toggle to flag migration
- Loading branch information
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
exports.up = function (db, cb) { | ||
db.runSql(` | ||
UPDATE permissions SET display_name = 'Create feature flags' WHERE permission = 'CREATE_FEATURE' AND type = 'project'; | ||
UPDATE permissions SET display_name = 'Update feature flags' WHERE permission = 'UPDATE_FEATURE' AND type = 'project'; | ||
UPDATE permissions SET display_name = 'Delete feature flags' WHERE permission = 'DELETE_FEATURE' AND type = 'project'; | ||
UPDATE permissions SET display_name = 'Change feature flag project' WHERE permission = 'MOVE_FEATURE_TOGGLE' AND type = 'project'; | ||
UPDATE permissions SET display_name = 'Enable/disable flags' WHERE permission = 'UPDATE_FEATURE_ENVIRONMENT' AND type = 'environment'; | ||
`, cb); | ||
}; | ||
|
||
exports.down = function (db, cb) { | ||
db.runSql( | ||
` | ||
UPDATE permissions | ||
SET display_name = 'Create feature toggles' | ||
WHERE permission = 'CREATE_FEATURE' | ||
AND type = 'project'; | ||
UPDATE permissions | ||
SET display_name = 'Update feature toggles' | ||
WHERE permission = 'UPDATE_FEATURE' | ||
AND type = 'project'; | ||
UPDATE permissions | ||
SET display_name = 'Delete feature toggles' | ||
WHERE permission = 'DELETE_FEATURE' | ||
AND type = 'project'; | ||
UPDATE permissions | ||
SET display_name = 'Change feature toggle project' | ||
WHERE permission = 'MOVE_FEATURE_TOGGLE' | ||
AND type = 'project'; | ||
UPDATE permissions | ||
SET display_name = 'Enable/disable toggles' | ||
WHERE permission = 'UPDATE_FEATURE_ENVIRONMENT' | ||
AND type = 'environment'; | ||
`, | ||
cb, | ||
); | ||
}; |