266c9587c8
* 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
13 lines
187 B
PL/PgSQL
13 lines
187 B
PL/PgSQL
BEGIN;
|
|
|
|
ALTER TABLE transactions
|
|
DROP CONSTRAINT fk_test;
|
|
|
|
ALTER TABLE transactions
|
|
ADD CONSTRAINT blocks_fk
|
|
FOREIGN KEY (block_id)
|
|
REFERENCES blocks (id)
|
|
ON DELETE CASCADE;
|
|
|
|
COMMIT;
|