1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-13 11:17:26 +02:00
unleash.unleash/src
Jaanus Sellin d8c83fb824
fix: do not allow creating cr for same environment (#10010)
If there are two concurrent requests to create or edit change requests,
two separate ones may be created in parallel. The UI does not currently
handle this scenario, and if additional changes are made, they might be
added to a random existing change request—resulting in a messy and
unpredictable state.

This PR adds a unique index to the `change_requests` table 
```
on (created_by, project, environment)
WHERE state NOT IN ('Applied', 'Cancelled', 'Rejected', 'Scheduled').
```

In the extremely rare case where such conflicting data already exists in
a database, the migration will automatically cancel one of the
conflicting change requests.
2025-05-30 08:20:11 +03:00
..
lib fix: do not allow creating cr for same environment (#10010) 2025-05-30 08:20:11 +03:00
mailtemplates chore: small visual improvements to the new invite mail template (#9998) 2025-05-15 08:52:01 +01:00
migrations fix: do not allow creating cr for same environment (#10010) 2025-05-30 08:20:11 +03:00
test chore!: remove deprecated put project groups roles endpoint (#10059) 2025-05-29 14:03:59 +01:00
migrator.ts feat: Unleash v7 ESM migration (#9877) 2025-05-14 09:47:12 +02:00
server-dev.ts feat: update sidebar navigation - refactors (#10037) 2025-05-28 12:00:28 +02:00
server.ts feat: Unleash v7 ESM migration (#9877) 2025-05-14 09:47:12 +02:00
test-setup.ts task: migrate tests to vitest 2025-05-16 11:19:10 +02:00