Skip to content

Commit

Permalink
Merge pull request #162 from makerdao/update-lock-constraint
Browse files Browse the repository at this point in the history
Script to update constraint
  • Loading branch information
adamgoth authored Apr 8, 2024
2 parents 05eeda7 + 936e0c2 commit 13ba4f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions migrations/074-unique-lock-update.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- existing contraint is (log_index, tx_id) and this does not work with multi-send transactions from gnosis safe
ALTER TABLE dschief.delegate_lock DROP CONSTRAINT delegate_lock_log_index_tx_id_key;

-- add a new constraint that includes the lock value and the from_address (delegate contract)
ALTER TABLE dschief.delegate_lock ADD CONSTRAINT delegate_lock_key UNIQUE (log_index, tx_id, from_address, lock);

0 comments on commit 13ba4f9

Please sign in to comment.