Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
adjust primary key (#1416)
Browse files Browse the repository at this point in the history
when we store the batches of two different systems (EFGS/CHGS), we
should adjust our primary key!
  • Loading branch information
hilmarf authored Jun 3, 2021
1 parent 38c323c commit 509c4d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ boolean saveDoNothingOnConflict(
@Query("INSERT INTO federation_batch_info "
+ "(batch_tag, date, status, source_system) "
+ "VALUES (:batchTag, :date, :status, :sourceSystem) "
+ "ON CONFLICT (batch_tag) DO UPDATE SET status=:status")
+ "ON CONFLICT (batch_tag, source_system) DO UPDATE SET status=:status")
void saveDoUpdateStatusOnConflict(
@Param("batchTag") String batchTag,
@Param("date") LocalDate date,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE federation_batch_info DROP CONSTRAINT federation_batch_info_pkey;
ALTER TABLE federation_batch_info ADD PRIMARY KEY (batch_tag, source_system);

0 comments on commit 509c4d5

Please sign in to comment.