Add light sync transactions table
- Foreign key to header instead of block - Can use same Transaction struct for both
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user