-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Required only a subset of ts metadata to be unique
By reducing the number of columns in constraint unique_main, we allow PutObservations to effectively update/overwrite other columns without creating a new time series.
- Loading branch information
1 parent
635dec3
commit d9490a5
Showing
5 changed files
with
198 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
datastore/migrate/data/migrations/1708586491_reduce_unique_constraint.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ALTER TABLE time_series | ||
DROP CONSTRAINT IF EXISTS unique_main, | ||
ADD CONSTRAINT unique_main UNIQUE NULLS NOT DISTINCT (version, type, title, summary, keywords, | ||
keywords_vocabulary, license, conventions, naming_authority, creator_type, creator_name, | ||
creator_email, creator_url, institution, project, source, platform, platform_vocabulary, | ||
standard_name, unit, instrument, instrument_vocabulary, level, period, function, | ||
parameter_name, link_href, link_rel, link_type, link_hreflang, link_title); |
4 changes: 4 additions & 0 deletions
4
datastore/migrate/data/migrations/1708586491_reduce_unique_constraint.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ALTER TABLE time_series | ||
DROP CONSTRAINT IF EXISTS unique_main, | ||
ADD CONSTRAINT unique_main UNIQUE NULLS NOT DISTINCT (naming_authority, platform, | ||
standard_name, instrument, level, period, function); |
d9490a5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API Unit Test Coverage Report
API Unit Test Coverage Summary