ipld-eth-server/db/migrations/00012_create_btc_transaction_cids_table.sql

13 lines
406 B
MySQL
Raw Normal View History

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,
tx_hash VARCHAR(66) NOT NULL UNIQUE,
2020-01-31 20:08:51 +00:00
cid TEXT NOT NULL,
segwit BOOL NOT NULL,
witness_hash VARCHAR(66)
2020-01-31 20:08:51 +00:00
);
-- +goose Down
DROP TABLE btc.transaction_cids;