Add light sync transactions table

- Foreign key to header instead of block
- Can use same Transaction struct for both
This commit is contained in:
Rob Mulholand
2019-03-28 14:31:17 -05:00
parent d93006321b
commit 79e011aad2
9 changed files with 154 additions and 1 deletions
@@ -0,0 +1,14 @@
-- +goose Up
CREATE TABLE light_sync_transactions (
id SERIAL PRIMARY KEY,
header_id INTEGER NOT NULL REFERENCES headers(id) ON DELETE CASCADE,
hash TEXT,
raw JSONB,
tx_index INTEGER,
tx_from TEXT,
tx_to TEXT,
UNIQUE (header_id, hash)
);
-- +goose Down
DROP TABLE light_sync_transactions;