ipld-eth-db/db/migrations/00001_create_ipfs_blocks_table.sql

14 lines
254 B
MySQL
Raw Normal View History

2021-08-29 18:55:44 +00:00
-- +goose Up
2023-02-09 00:35:07 +00:00
CREATE SCHEMA ipld;
CREATE TABLE IF NOT EXISTS ipld.blocks (
2022-03-22 00:53:48 +00:00
block_number BIGINT NOT NULL,
2023-02-09 00:35:07 +00:00
key TEXT NOT NULL,
2022-03-22 00:53:48 +00:00
data BYTEA NOT NULL,
PRIMARY KEY (key, block_number)
2021-08-29 18:55:44 +00:00
);
-- +goose Down
2023-02-09 00:35:07 +00:00
DROP TABLE ipld.blocks;
DROP SCHEMA ipld;