Closed agstephens closed 3 years ago
Need to add primary_id_scheme as a primary key to the station_configuration table.
primary_id_scheme
station_configuration
The header_table, and its children, will also need to be changed from:
header_table
FOREIGN KEY( primary_station_id, station_record_number) REFERENCES cdm_v1.station_configuration( primary_id, record_number)
to:
FOREIGN KEY( primary_station_id, primary_station_id_scheme, station_record_number) REFERENCES cdm_v1.station_configuration( primary_id, primary_id_scheme, record_number)
At the moment the id_scheme is nullable, that needs to be changed as well.
Fixed in commit:
https://github.com/glamod/glamod_database/commit/589c944074d0ef09b18ce4c2d7aafc010ef6ce99
Still need to test before closing.
Moving last component to new issue and closing this.
Need to add
primary_id_scheme
as a primary key to thestation_configuration
table.The
header_table
, and its children, will also need to be changed from:FOREIGN KEY( primary_station_id, station_record_number) REFERENCES cdm_v1.station_configuration( primary_id, record_number)
to:
FOREIGN KEY( primary_station_id, primary_station_id_scheme, station_record_number) REFERENCES cdm_v1.station_configuration( primary_id, primary_id_scheme, record_number)
At the moment the id_scheme is nullable, that needs to be changed as well.