icefoganalytics / elcc-data-management

Data Management application for Education's Early Learning Child Centre
Apache License 2.0
0 stars 0 forks source link

ELCC-15: Establish Appropriate Foriegn Key Constraints In Database #44

Closed klondikemarlen closed 1 year ago

klondikemarlen commented 1 year ago

Fixes ELCC-15

Context

Add standard id based foreign key linking users and user_roles table. Check if any other tables are missing this kind of thing.

Implemenation

Link users.id -> user_roles.user_id

Testing Instructions

  1. Boot the app via dev up, this also check that migrations run.

  2. Check that the app complies, and that you can log in at http://localhost:8080.

  3. Check that you can role the migration back and forward via

    dev migrate down -- --step 2
    dev migrate up