2020-01-31 20:08:51 +00:00
|
|
|
-- +goose Up
|
|
|
|
CREATE TABLE btc.tx_outputs (
|
2020-02-04 21:20:49 +00:00
|
|
|
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,
|
|
|
|
pk_script BYTEA NOT NULL,
|
|
|
|
script_class INTEGER NOT NULL,
|
|
|
|
addresses VARCHAR(66)[],
|
|
|
|
required_sigs INTEGER NOT NULL,
|
2020-01-31 20:08:51 +00:00
|
|
|
UNIQUE (tx_id, index)
|
|
|
|
);
|
|
|
|
|
|
|
|
-- +goose Down
|
|
|
|
DROP TABLE btc.tx_outputs;
|