ipld-eth-db/db/migrations/00001_create_ipfs_blocks_table.sql
2022-03-21 19:53:48 -05:00

11 lines
226 B
SQL

-- +goose Up
CREATE TABLE IF NOT EXISTS public.blocks (
block_number BIGINT NOT NULL,
key TEXT UNIQUE NOT NULL,
data BYTEA NOT NULL,
PRIMARY KEY (key, block_number)
);
-- +goose Down
DROP TABLE public.blocks;