2019-01-22 12:15:29 +00:00
|
|
|
-- +goose Up
|
2018-11-06 17:11:09 +00:00
|
|
|
CREATE TABLE maker.flap_kick (
|
|
|
|
id SERIAL PRIMARY KEY,
|
|
|
|
header_id INTEGER NOT NULL REFERENCES headers (id) ON DELETE CASCADE,
|
|
|
|
bid_id NUMERIC NOT NULL,
|
|
|
|
lot NUMERIC NOT NULL,
|
|
|
|
bid NUMERIC NOT NULL,
|
|
|
|
gal TEXT,
|
|
|
|
"end" TIMESTAMP WITH TIME ZONE,
|
|
|
|
tx_idx INTEGER NOT NULL,
|
|
|
|
log_idx INTEGER NOT NULL,
|
|
|
|
raw_log JSONB,
|
|
|
|
UNIQUE (header_id, tx_idx, log_idx)
|
|
|
|
);
|
|
|
|
|
|
|
|
ALTER TABLE public.checked_headers
|
2019-01-22 12:15:29 +00:00
|
|
|
ADD COLUMN flap_kick_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
|
|
|
|
2019-01-22 14:07:11 +00:00
|
|
|
|
2019-01-22 12:15:29 +00:00
|
|
|
-- +goose Down
|
|
|
|
DROP TABLE maker.flap_kick;
|
|
|
|
ALTER TABLE public.checked_headers
|
2019-01-22 14:07:11 +00:00
|
|
|
DROP COLUMN flap_kick_checked;
|