Skip to content

Commit

Permalink
fix(coordinator): Add unique_end_date constraint to funding_rates
Browse files Browse the repository at this point in the history
We only need one funding rate entry per `end_date`.

Without this change we were getting a new duplicate entry per
maker restart.
  • Loading branch information
luckysori committed Jun 6, 2024
1 parent 4d13e73 commit fc36c9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE funding_rates
DROP CONSTRAINT IF EXISTS unique_end_date;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE funding_rates
ADD CONSTRAINT unique_end_date UNIQUE (end_date);

0 comments on commit fc36c9a

Please sign in to comment.