KaylaCrush / advocacy-maps

The good governance project (GGP) is a non-partisan democracy reform group.
https://mapletestimony.org
MIT License
0 stars 1 forks source link

setup foreign keys for source/header info #52

Closed KaylaCrush closed 1 year ago

KaylaCrush commented 1 year ago

right now, I'm saving the source_name, date_range (should be source_date_range, REALLY), and source_type on every row of every table. This is because the combo of source name and date range is the one unique thing about every disclosure page, and I want that relationship to be maintained.

But that's a bad way to do it. What I SHOULD do is add a source_id column to the headers table and each of the subsequent tables. That way I could remove souce_name, date_range, and source_type from all of the baby tables and just have the one numeric column that links back to the header.

KaylaCrush commented 1 year ago

done, still some bugs to work out with table inserting though