ipld-eth-server/db/migrations/00018_add_unique_constraint_blocks_node.sql
2019-02-26 00:52:54 -06:00

8 lines
183 B
SQL

-- +goose Up
ALTER TABLE blocks
ADD CONSTRAINT node_id_block_number_uc UNIQUE (block_number, node_id);
-- +goose Down
ALTER TABLE blocks
DROP CONSTRAINT node_id_block_number_uc;