8000 Refactor user actions · Issue #551 · cfpb/sbl-filing-api · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Refactor user actions #551
Open
Open
@lchen-2101

Description

@lchen-2101

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonPull requests that update Python code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0