ipld-eth-server/db/migrations/00037_create_eth_state_cids_table.sql

12 lines
413 B
MySQL
Raw Normal View History

2019-04-15 16:30:41 +00:00
-- +goose Up
2020-01-31 19:25:15 +00:00
CREATE TABLE eth.state_cids (
2019-04-15 16:30:41 +00:00
id SERIAL PRIMARY KEY,
2020-01-31 19:25:15 +00:00
header_id INTEGER NOT NULL REFERENCES eth.header_cids (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
state_key VARCHAR(66) NOT NULL,
leaf BOOLEAN NOT NULL,
2019-04-15 16:30:41 +00:00
cid TEXT NOT NULL,
UNIQUE (header_id, state_key)
2019-04-15 16:30:41 +00:00
);
-- +goose Down
2020-01-31 19:25:15 +00:00
DROP TABLE eth.state_cids;