ipfs-ethdb/postgres/db/migrations/00003_create_eth_key_preimages_table.sql
2020-09-11 07:35:41 -05:00

10 lines
262 B
SQL

-- +goose Up
CREATE TABLE IF NOT EXISTS eth.key_preimages (
eth_key BYTEA UNIQUE NOT NULL,
prefix BYTEA,
ipfs_key TEXT NOT NULL REFERENCES public.blocks (key) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED
);
-- +goose Down
DROP TABLE eth.key_preimages;