glamod / glamod-ingest

Database preparation and ingestion for GLAMOD
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Primary key change in station_configuration table #18

Closed agstephens closed 3 years ago

agstephens commented 4 years ago

Need to add primary_id_scheme as a primary key to the station_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.

agstephens commented 4 years ago

Fixed in commit:

https://github.com/glamod/glamod_database/commit/589c944074d0ef09b18ce4c2d7aafc010ef6ce99

Still need to test before closing.

agstephens commented 3 years ago

Moving last component to new issue and closing this.