This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure uniqueness of diagnosis keys (#388)
* wip * overwriting default save is working, needs some cleanup still. * save test data again * fix tests + write tests for duplicate detection * Add NativeNamedQuery * Stuff that werks! * create migration scripts * make key_data not nullable * test * Add Javadoc * Add static modifier * Fix failing test Co-authored-by: Michael Burwig <michael.burwig@sap.com>
- Loading branch information
1 parent
00a3422
commit db3d5fa
Showing
9 changed files
with
79 additions
and
16 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
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
3 changes: 3 additions & 0 deletions
3
common/persistence/src/main/resources/db/migration/h2/V3__makeKeyDataPrimaryKey.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,3 @@ | ||
ALTER TABLE diagnosis_key DROP COLUMN id; | ||
ALTER TABLE diagnosis_key ALTER COLUMN key_data SET NOT NULL; | ||
ALTER TABLE diagnosis_key ADD PRIMARY KEY (key_data); |
3 changes: 3 additions & 0 deletions
3
common/persistence/src/main/resources/db/migration/postgres/V3__makeKeyDataPrimaryKey.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,3 @@ | ||
ALTER TABLE diagnosis_key DROP COLUMN id; | ||
ALTER TABLE diagnosis_key ALTER COLUMN key_data SET NOT NULL; | ||
ALTER TABLE diagnosis_key ADD PRIMARY KEY (key_data); |
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