mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-13 11:17:26 +02:00
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. |
||
---|---|---|
.. | ||
lib | ||
mailtemplates | ||
migrations | ||
test | ||
migrator.ts | ||
server-dev.ts | ||
server.ts | ||
test-setup.ts |