Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
project: Reduce impact of duplicatd project member
It is possible to be duplicated when to add a user as a project member. The best solution is searching and removing all duplicated members. And after that, add unique constraints into project_user table. ``` delete p1 from project_user p1, project_user p2 where p1.id > p2.id and p1.user_id = p2.user_id and p1.project_id = p2.project_id and p1.role_id = p2.role_id; alter table project_user add constraint uq_project_user_1 unique (user_id, project_id, role_id); ``` But more easy way to control this bug is just making it removable from project member. This commit implemented second one. See: Yona Github issue #364
- Loading branch information