diff --git a/migrations/074-unique-lock-update.sql b/migrations/074-unique-lock-update.sql new file mode 100644 index 0000000..135cef8 --- /dev/null +++ b/migrations/074-unique-lock-update.sql @@ -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); \ No newline at end of file