migration for applying log_cids.leaf_mh_key FK constraint to check that repair process was completed
This commit is contained in:
parent
6612edabbe
commit
edabfcc9c9
@ -0,0 +1,9 @@
|
||||
-- +goose Up
|
||||
ALTER TABLE eth.log_cids
|
||||
ADD CONSTRAINT fk_log_leaf_mh_key
|
||||
FOREIGN KEY (leaf_mh_key) REFERENCES public.blocks (key)
|
||||
ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
-- +goose Down
|
||||
ALTER TABLE eth.log_cids
|
||||
DROP CONSTRAINT fk_log_leaf_mh_key;
|
@ -21,7 +21,15 @@ WHERE indrelid = (
|
||||
WHERE relname='eth.header_cids'
|
||||
);
|
||||
|
||||
ALTER TABLE eth.log_cids
|
||||
DROP CONSTRAINT fk_log_leaf_mh_key;
|
||||
|
||||
-- +goose Down
|
||||
ALTER TABLE eth.log_cids
|
||||
ADD CONSTRAINT fk_log_leaf_mh_key
|
||||
FOREIGN KEY (leaf_mh_key) REFERENCES public.blocks (key)
|
||||
ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
UPDATE pg_index
|
||||
SET indisready=true
|
||||
WHERE indrelid = (
|
Loading…
Reference in New Issue
Block a user