energyPATHWAYS / EnergyPATHWAYS

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

Closed ryandrewjones closed 8 years ago

ryandrewjones commented 8 years ago

[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.

ryandrewjones commented 8 years ago

This ticket is being addressed in branch postgres_w_primarykeys_39

ryandrewjones commented 8 years ago

Merged into master by Michael.