You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure how the data/ifg-ministers-database.sqlite file is being generated, but it’d be great if it could include foreign keys linking the tables. Using sqlite-utils, I added them using the below (probably missed one), but perhaps this can be done as part of your flow that is creating the file:
sqlite-utils add-foreign-key ifg-ministers-database.sqlite appointment person_id person id
sqlite-utils add-foreign-key ifg-ministers-database.sqlite appointment post_id post id
sqlite-utils add-foreign-key ifg-ministers-database.sqlite appointment_characteristics appointment_id appointment id
sqlite-utils add-foreign-key ifg-ministers-database.sqlite organisation_link predecessor_organisation_id organisation id
sqlite-utils add-foreign-key ifg-ministers-database.sqlite organisation_link successor_organisation_id organisation id
sqlite-utils add-foreign-key ifg-ministers-database.sqlite post organisation_id organisation id
sqlite-utils add-foreign-key ifg-ministers-database.sqlite post_relationship post_id post id
sqlite-utils add-foreign-key ifg-ministers-database.sqlite representation person_id person id
sqlite-utils add-foreign-key ifg-ministers-database.sqlite representation constituency_id constituency id
sqlite-utils add-foreign-key ifg-ministers-database.sqlite representation_characteristics representation_id representation id
This will then eg prevent any data with non matching keys from making its way into the database.
The text was updated successfully, but these errors were encountered:
I'm not sure how the
data/ifg-ministers-database.sqlite
file is being generated, but it’d be great if it could include foreign keys linking the tables. Usingsqlite-utils
, I added them using the below (probably missed one), but perhaps this can be done as part of your flow that is creating the file:This will then eg prevent any data with non matching keys from making its way into the database.
The text was updated successfully, but these errors were encountered: