ipld-eth-server/db/migrations/00010_create_eth_state_accouts_table.sql

13 lines
451 B
MySQL
Raw Normal View History

-- +goose Up
CREATE TABLE eth.state_accounts (
id SERIAL PRIMARY KEY,
2020-09-02 15:12:47 +00:00
state_id INTEGER NOT NULL REFERENCES eth.state_cids (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
balance NUMERIC NOT NULL,
nonce INTEGER NOT NULL,
code_hash BYTEA NOT NULL,
storage_root VARCHAR(66) NOT NULL,
UNIQUE (state_id)
);
-- +goose Down
DROP TABLE eth.state_accounts;