2020-03-22 00:50:12 +00:00
|
|
|
-- +goose Up
|
|
|
|
CREATE TABLE eth.state_accounts (
|
|
|
|
id SERIAL PRIMARY KEY,
|
2021-03-12 15:50:48 +00:00
|
|
|
state_id BIGINT NOT NULL REFERENCES eth.state_cids (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
|
2020-03-22 00:50:12 +00:00
|
|
|
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;
|