2020-01-31 20:08:51 +00:00
|
|
|
-- +goose Up
|
|
|
|
CREATE TABLE btc.transaction_cids (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
header_id INTEGER NOT NULL REFERENCES btc.header_cids (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
|
|
|
|
index INTEGER NOT NULL,
|
2020-02-04 21:20:49 +00:00
|
|
|
tx_hash VARCHAR(66) NOT NULL UNIQUE,
|
2020-01-31 20:08:51 +00:00
|
|
|
cid TEXT NOT NULL,
|
2020-07-13 15:39:51 +00:00
|
|
|
mh_key TEXT NOT NULL REFERENCES public.blocks (key) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
|
2020-02-04 21:20:49 +00:00
|
|
|
segwit BOOL NOT NULL,
|
|
|
|
witness_hash VARCHAR(66)
|
2020-01-31 20:08:51 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
-- +goose Down
|
|
|
|
DROP TABLE btc.transaction_cids;
|