forked from cerc-io/ipld-eth-server
925b1b0b1c
- This reverts commit 4e2536bf421fd9d2c9067d81f30e0f45c6b94fe7. - Restore timestamped migrations so goose fix can handle ordering dynamically with plugins also supplying timestamp based migrations
17 lines
351 B
SQL
17 lines
351 B
SQL
-- +goose Up
|
|
ALTER TABLE blocks
|
|
ADD COLUMN eth_node_fingerprint VARCHAR(128);
|
|
|
|
UPDATE blocks
|
|
SET eth_node_fingerprint = (
|
|
SELECT eth_node_id FROM eth_nodes WHERE eth_nodes.id = blocks.eth_node_id
|
|
);
|
|
|
|
ALTER TABLE blocks
|
|
ALTER COLUMN eth_node_fingerprint SET NOT NULL;
|
|
|
|
|
|
-- +goose Down
|
|
ALTER TABLE blocks
|
|
DROP COLUMN eth_node_fingerprint;
|