Open
Description
We currently have a standalone user actions table, and each time a relationship needs to be built between the filing to the user action, a new field is added to the filing object, and a new mapping table is added to relate the filing to the user action. Proposal to to have user actions table have a many to one relationship to the filing table; and each time a new type of action is needed, no mapping table is needed, and little to no modification to the filing table is needed.
tasks:
- update user_action table by adding filing_id, and submission_id as foreign keys to their respective tables; filing_id should be non-nullable, submission_id is nullable
- need to seed those fields accordingly first, so in alembic scripts, filing_id would start out nullable, get them populated, then be altered to non-nullable
- update UserActionDAO accordingly
- update FilingDAO to have a list of UserActionDAO and remove other mapped UserActionDAO fields
- update SubmissionDAO to have a list of UserActionDAO and remove other mapped UserActionDAO fields
- update DTOs to have previously mapped fields to be transient, and derive them from the list of user actions
- remove mapping tables and DAOs