2019-01-22 12:15:29 +00:00
|
|
|
-- +goose Up
|
2019-06-10 17:17:14 +00:00
|
|
|
ALTER TABLE eth_blocks
|
2018-05-07 15:41:02 +00:00
|
|
|
ADD COLUMN eth_node_fingerprint VARCHAR(128);
|
|
|
|
|
2019-06-10 17:17:14 +00:00
|
|
|
UPDATE eth_blocks
|
2018-05-07 15:41:02 +00:00
|
|
|
SET eth_node_fingerprint = (
|
2019-06-10 17:17:14 +00:00
|
|
|
SELECT eth_node_id FROM eth_nodes WHERE eth_nodes.id = eth_blocks.eth_node_id
|
2018-05-07 15:41:02 +00:00
|
|
|
);
|
|
|
|
|
2019-06-10 17:17:14 +00:00
|
|
|
ALTER TABLE eth_blocks
|
2018-05-07 15:41:02 +00:00
|
|
|
ALTER COLUMN eth_node_fingerprint SET NOT NULL;
|
|
|
|
|
2019-01-22 12:15:29 +00:00
|
|
|
|
|
|
|
-- +goose Down
|
2019-06-10 17:17:14 +00:00
|
|
|
ALTER TABLE eth_blocks
|
2019-01-22 14:07:11 +00:00
|
|
|
DROP COLUMN eth_node_fingerprint;
|