ipld-eth-server/db/migrations/1513192766_add_cascade_delete_to_transactions.down.sql
Matt K 266c9587c8 Canonical blocks (#108)
* Update Block w/ newest Block

* Add cascading delete to blocks and transactions tables

* Add handling for new conflicting blocks

* Command line version of sliding window n behind HEAD
2017-12-19 14:14:41 -06:00

11 lines
168 B
PL/PgSQL

BEGIN;
ALTER TABLE transactions
DROP CONSTRAINT blocks_fk;
ALTER TABLE transactions
ADD CONSTRAINT fk_test
FOREIGN KEY (block_id)
REFERENCES blocks (id);
COMMIT;