Normalization would help simplify this situation and reduce the amount of redundant data present.
Requirements
Create new locality table
Update agencies logic so that, when an agency has a locality not yet present in the localities table, that locality is added, and the reference updated.
Update variable column permissions logic for agencies to account for the change in column nomenclature.
Tests
Add tests that, when a new locality is added, it properly populates the localities table, and a foreign key to that entry exists in the relevant agencies row
Docs
Ensure that agencies column permission table is properly updated
Context
agencies
tableRequirements
locality
tableagencies
logic so that, when an agency has a locality not yet present in thelocalities
table, that locality is added, and the reference updated.agencies
to account for the change in column nomenclature.Tests
localities
table, and a foreign key to that entry exists in the relevantagencies
rowDocs
agencies
column permission table is properly updatedOpen questions