-
Notifications
You must be signed in to change notification settings - Fork 54
0017 use relationship table between user history and project
mvanzalu edited this page May 11, 2022
·
1 revision
Date: 2022-03-14
Accepted
Multi project search has been previously implemented. Consequently, saving search involving multiple projects should be possible.
In terms of data persistance and database we decided to modify the USER_HISTORY
table by removing the PRJ_ID
column.
Additionally we will create a relationship table linking user history ids and project ids in order to guarantee an N:M relationship.
The new table USER_HISTORY_PROJECT will have the following constraints :
- UNIQUE constraint between the user history id and project id to avoid unnecessary duplicates.
- FOREIGN KEY on the user history to make sure that existing elements are bound. We will not add a FOREIGN KEY on the project id because we don't store the project ids in the database.
The backend will have to make multiple queries to insert or delete user history events, transactional queries will be used