ipld-eth-server/db/migrations/00025_create_light_sync_transactions_table.sql
2019-04-04 15:21:39 -05:00

20 lines
460 B
SQL

-- +goose Up
CREATE TABLE light_sync_transactions (
id SERIAL PRIMARY KEY,
header_id INTEGER NOT NULL REFERENCES headers(id) ON DELETE CASCADE,
hash TEXT,
gas_limit NUMERIC,
gas_price NUMERIC,
input_data BYTEA,
nonce NUMERIC,
raw BYTEA,
tx_from TEXT,
tx_index INTEGER,
tx_to TEXT,
"value" NUMERIC,
UNIQUE (header_id, hash)
);
-- +goose Down
DROP TABLE light_sync_transactions;