1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-09 13:47:13 +02:00

fix: do not allow creating cr for same environment

This commit is contained in:
sjaanus 2025-05-16 10:56:33 +03:00
parent 097f1d3af5
commit b1f6b76841
No known key found for this signature in database
GPG Key ID: 20E007C0248BA7FF

View File

@ -16,7 +16,7 @@ exports.up = (db, callback) => {
SELECT id FROM ranked WHERE rn > 1
);
CREATE UNIQUE INDEX unique_pending_request_per_user_project_env
CREATE UNIQUE INDEX IF NOT EXISTS unique_pending_request_per_user_project_env
ON change_requests (created_by, project, environment)
WHERE state NOT IN ('Applied', 'Cancelled', 'Rejected', 'Scheduled');
`,