Closed chmnata closed 1 month ago
Ran into an error ERROR: multiple primary keys for table "loop_detector" are not allowed
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:
add constraint if exist
Create table if not exist ( column1 data_type, column2 data_type, constraint pk_mail_app_recipients primary key (column1)
Then it will only add a primary key constraint when a new table is created.
https://github.com/CityofToronto/bdit_data-sources/blob/f79fd6eee455f2ca35a002ba081270f8f13012c1/gis/gccview/gcc_puller_functions.py#L191
@chmnata should this issue also be closed as not planned?
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:Then it will only add a primary key constraint when a new table is created.
https://github.com/CityofToronto/bdit_data-sources/blob/f79fd6eee455f2ca35a002ba081270f8f13012c1/gis/gccview/gcc_puller_functions.py#L191