ipld-eth-server/db/migrations/00002_create_transactions_table.sql

16 lines
385 B
MySQL
Raw Normal View History

-- +goose Up
CREATE TABLE transactions (
id SERIAL PRIMARY KEY,
block_id INTEGER NOT NULL REFERENCES blocks(id) ON DELETE CASCADE,
input_data VARCHAR,
tx_from VARCHAR(66),
gaslimit NUMERIC,
gasprice NUMERIC,
hash VARCHAR(66),
nonce NUMERIC,
tx_to VARCHAR(66),
"value" NUMERIC
);
-- +goose Down
DROP TABLE transactions;