shaezard
1824990980
fix: add teamID/userUid filter to updateMany queries, Fixed Row level locking to prevent deadlocks and achieve ~100x performance improvement (#5647)
* fix: add teamID/userUid filter to updateMany queries
Prevents cross-user/cross-team orderIndex corruption
* fix: fix orderIndex of existing collections
* feat(backend): add cascade delete for collections
- Add onDelete: Cascade to TeamCollection parent relationship
- Add onDelete: Cascade to UserRequest → UserCollection relationship
- Remove manual recursive deleteCollectionData methods
- Simplify deleteUserCollection and deleteTeamCollection services
- Add Prisma migration for cascade delete foreign keys
Resolves #5654
* refactor(team-collection): remove manual deleteCollectionData method
Resolves #5654
* fix(backend): fixed locking mechanisms for collections and requests
- User/Team Collection/Requests
Resolves #5666
---------
Co-authored-by: Abdur Rahman Daanish <abdurrahman_daanish@intuit.com>