ipld-eth-server/db/migrations/00044_create_btc_tx_outputs_table.sql

12 lines
357 B
MySQL
Raw Normal View History

2020-01-31 20:08:51 +00:00
-- +goose Up
CREATE TABLE btc.tx_outputs (
id SERIAL PRIMARY KEY,
tx_id INTEGER NOT NULL REFERENCES btc.transaction_cids (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
index INTEGER NOT NULL,
value INTEGER NOT NULL,
2020-02-02 21:58:07 +00:00
pk_script BYTEA NOT NULL,
2020-01-31 20:08:51 +00:00
UNIQUE (tx_id, index)
);
-- +goose Down
DROP TABLE btc.tx_outputs;