ipld-eth-db/db/migrations/00001_create_ipfs_blocks_table.sql
2023-02-08 18:35:07 -06:00

14 lines
254 B
SQL

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