ipld-eth-server/db/migrations/00002_create_transactions_table.sql
Rob Mulholand d9e2bece27 Consolidate migrations
- Facilitate modifying migrations without cascading consequences for
  later migrations updating the same tables
2019-03-23 10:57:39 -05:00

16 lines
385 B
SQL

-- +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;