Deleting a project with ticket statuses returns HTTP 500 on MariaDB. The project delete cascades through board columns and statuses at the same time, causing a foreign key violation. The desktop app then displays its generic server response error.
Fix
Delete the project's ticket statuses within the existing transaction before deleting the project. The database can then cascade the remaining project data without conflicting with the status-to-board-column relation.
Verification
Reproduced the production SQLSTATE 23000 error with the existing project deletion test against an isolated local MariaDB 11.4 database before the fix.
ProjectControllerTest: 27 tests passed on MariaDB and 27 tests passed with the default SQLite configuration.
ProjectApiTest delete case: passed on MariaDB.
Pint and git diff checks passed.
No production project deletion or production database write was performed.
## Problem
Deleting a project with ticket statuses returns HTTP 500 on MariaDB. The project delete cascades through board columns and statuses at the same time, causing a foreign key violation. The desktop app then displays its generic server response error.
## Fix
Delete the project's ticket statuses within the existing transaction before deleting the project. The database can then cascade the remaining project data without conflicting with the status-to-board-column relation.
## Verification
- Reproduced the production SQLSTATE 23000 error with the existing project deletion test against an isolated local MariaDB 11.4 database before the fix.
- ProjectControllerTest: 27 tests passed on MariaDB and 27 tests passed with the default SQLite configuration.
- ProjectApiTest delete case: passed on MariaDB.
- Pint and git diff checks passed.
No production project deletion or production database write was performed.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
Deleting a project with ticket statuses returns HTTP 500 on MariaDB. The project delete cascades through board columns and statuses at the same time, causing a foreign key violation. The desktop app then displays its generic server response error.
Fix
Delete the project's ticket statuses within the existing transaction before deleting the project. The database can then cascade the remaining project data without conflicting with the status-to-board-column relation.
Verification
No production project deletion or production database write was performed.