CityofToronto / bdit_data-sources

Data sources used by the Big Data Innovation Team
https://github.com/orgs/CityofToronto/teams/bigdatainnovationteam
GNU General Public License v3.0
39 stars 8 forks source link

GCC Puller: Create primary key only if not exist #900

Closed chmnata closed 1 month ago

chmnata commented 8 months ago

Ran into an error ERROR: multiple primary keys for table "loop_detector" are not allowed

Not exactly sure why this wasn't an issue before.... And because there is no add constraint if exist, there are a couple of solutions:

https://github.com/CityofToronto/bdit_data-sources/blob/f79fd6eee455f2ca35a002ba081270f8f13012c1/gis/gccview/gcc_puller_functions.py#L191

gabrielwol commented 4 months ago

@chmnata should this issue also be closed as not planned?