ipld-eth-server/db/migrations/20180809214845_create_frob.sql

27 lines
641 B
MySQL
Raw Normal View History

-- +goose Up
2018-08-09 21:55:02 +00:00
CREATE TABLE maker.frob (
id SERIAL PRIMARY KEY,
header_id INTEGER NOT NULL REFERENCES headers (id) ON DELETE CASCADE,
ilk INTEGER NOT NULL REFERENCES maker.ilks (id),
2018-10-22 19:37:59 +00:00
urn TEXT,
dink NUMERIC,
dart NUMERIC,
2018-08-09 21:55:02 +00:00
ink NUMERIC,
art NUMERIC,
iart NUMERIC,
2018-10-22 19:37:59 +00:00
log_idx INTEGER NOT NUll,
tx_idx INTEGER NOT NUll,
raw_log JSONB,
2018-10-22 19:37:59 +00:00
UNIQUE (header_id, tx_idx, log_idx)
2018-10-26 13:26:36 +00:00
);
ALTER TABLE public.checked_headers
ADD COLUMN frob_checked BOOLEAN NOT NULL DEFAULT FALSE;
-- +goose Down
DROP TABLE maker.frob;
ALTER TABLE public.checked_headers
DROP COLUMN frob_checked;