EnergyPATHWAYS model is a professional, open-source energy and carbon planning tool for use in evaluating long-term, economy-wide greenhouse gas mitigation scenarios.
MIT License
45
stars
15
forks
source link
Version of postgres database with primary keys throughout #39
The move to sqlalchemy and good general database practice requires us to have primary keys in every table. This ticket is to do just that.
I've used this ticket/branch as an opportunity to fill in foreign key constraints in places where I saw they were missing and to delete some database tables altogether where they were no longer needed.
Adding primary keys has often required an old column "id" to be changed to "parent_id" (correct description) and then "id" added anew as the primary key. This will necessitate some code changes, which will also take place on the same branch.
[technical ticket no story]
The move to sqlalchemy and good general database practice requires us to have primary keys in every table. This ticket is to do just that.
I've used this ticket/branch as an opportunity to fill in foreign key constraints in places where I saw they were missing and to delete some database tables altogether where they were no longer needed.
Adding primary keys has often required an old column "id" to be changed to "parent_id" (correct description) and then "id" added anew as the primary key. This will necessitate some code changes, which will also take place on the same branch.