2020-01-31 20:08:51 +00:00
|
|
|
-- +goose Up
|
|
|
|
CREATE TABLE btc.header_cids (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
block_number BIGINT NOT NULL,
|
|
|
|
block_hash VARCHAR(66) NOT NULL,
|
|
|
|
parent_hash VARCHAR(66) NOT NULL,
|
|
|
|
cid TEXT NOT NULL,
|
2020-02-09 21:28:30 +00:00
|
|
|
timestamp NUMERIC NOT NULL,
|
|
|
|
bits BIGINT NOT NULL,
|
2020-01-31 20:08:51 +00:00
|
|
|
UNIQUE (block_number, block_hash)
|
|
|
|
);
|
|
|
|
|
|
|
|
-- +goose Down
|
|
|
|
DROP TABLE btc.header_cids;
|