ipld-eth-db/db/migrations/00010_create_eth_state_accounts_table.sql
2022-08-08 11:06:00 -05:00

15 lines
481 B
SQL

-- +goose Up
CREATE TABLE IF NOT EXISTS eth.state_accounts (
block_number BIGINT NOT NULL,
header_id VARCHAR(66) NOT NULL,
state_path BYTEA NOT NULL,
balance NUMERIC NOT NULL,
nonce BIGINT NOT NULL,
code_hash VARCHAR(66) NOT NULL,
storage_root VARCHAR(66) NOT NULL,
PRIMARY KEY (state_path, header_id, block_number)
);
-- +goose Down
DROP TABLE eth.state_accounts;