ipld-eth-server/db/migrations/00038_create_eth_storage_cids_table.sql

12 lines
417 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.storage_cids (
2019-04-15 16:30:41 +00:00
id SERIAL PRIMARY KEY,
2020-01-31 19:25:15 +00:00
state_id INTEGER NOT NULL REFERENCES eth.state_cids (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
2019-04-15 16:30:41 +00:00
storage_key VARCHAR(66) NOT NULL,
leaf BOOLEAN NOT NULL,
2019-04-15 16:30:41 +00:00
cid TEXT NOT NULL,
UNIQUE (state_id, storage_key)
);
-- +goose Down
2020-01-31 19:25:15 +00:00
DROP TABLE eth.storage_cids;