forked from cerc-io/ipld-eth-server
Merge pull request #93 from 8thlight/vdb-178-squash-trivial-migrations
[WIP] VDB-178 Squash trivial migrations
This commit is contained in:
commit
82e749f550
4
db/migrations/1532468319_create_flip_kick.down.sql
Normal file
4
db/migrations/1532468319_create_flip_kick.down.sql
Normal file
@ -0,0 +1,4 @@
|
||||
DROP TABLE maker.flip_kick;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN flip_kick_checked;
|
@ -13,3 +13,6 @@ CREATE TABLE maker.flip_kick (
|
||||
raw_log JSONB,
|
||||
UNIQUE (header_id, tx_idx, log_idx)
|
||||
);
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN flip_kick_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1 +0,0 @@
|
||||
DROP TABLE maker.flip_kick;
|
4
db/migrations/1533844125_create_frob.down.sql
Normal file
4
db/migrations/1533844125_create_frob.down.sql
Normal file
@ -0,0 +1,4 @@
|
||||
DROP TABLE maker.frob;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN frob_checked;
|
@ -12,4 +12,7 @@ CREATE TABLE maker.frob (
|
||||
tx_idx INTEGER NOT NUll,
|
||||
raw_log JSONB,
|
||||
UNIQUE (header_id, tx_idx, log_idx)
|
||||
);
|
||||
);
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN frob_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1 +0,0 @@
|
||||
DROP TABLE maker.frob;
|
4
db/migrations/1534295712_create_tend.down.sql
Normal file
4
db/migrations/1534295712_create_tend.down.sql
Normal file
@ -0,0 +1,4 @@
|
||||
DROP TABLE maker.tend;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN tend_checked;
|
@ -1,7 +1,7 @@
|
||||
CREATE TABLE maker.tend (
|
||||
id SERIAL PRIMARY KEY,
|
||||
header_id INTEGER NOT NULL REFERENCES headers (id) ON DELETE CASCADE,
|
||||
bid_id NUMERIC NOT NULL UNIQUE,
|
||||
bid_id NUMERIC NOT NULL,
|
||||
lot NUMERIC,
|
||||
bid NUMERIC,
|
||||
guy TEXT,
|
||||
@ -11,3 +11,6 @@ CREATE TABLE maker.tend (
|
||||
raw_log JSONB,
|
||||
UNIQUE (header_id, tx_idx, log_idx)
|
||||
);
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN tend_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1 +0,0 @@
|
||||
DROP TABLE maker.tend;
|
4
db/migrations/1534295713_create_bite.down.sql
Normal file
4
db/migrations/1534295713_create_bite.down.sql
Normal file
@ -0,0 +1,4 @@
|
||||
DROP TABLE maker.bite;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN bite_checked;
|
@ -12,4 +12,7 @@ CREATE TABLE maker.bite (
|
||||
log_idx INTEGER NOT NUll,
|
||||
raw_log JSONB,
|
||||
UNIQUE (header_id, tx_idx, log_idx)
|
||||
)
|
||||
);
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN bite_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1 +0,0 @@
|
||||
DROP TABLE maker.bite;
|
4
db/migrations/1534799167_create_dent.down.sql
Normal file
4
db/migrations/1534799167_create_dent.down.sql
Normal file
@ -0,0 +1,4 @@
|
||||
DROP TABLE maker.dent;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN dent_checked;
|
@ -1,7 +1,7 @@
|
||||
CREATE TABLE maker.dent (
|
||||
id SERIAL PRIMARY KEY,
|
||||
header_id INTEGER NOT NULL REFERENCES headers (id) ON DELETE CASCADE,
|
||||
bid_id NUMERIC NOT NULL UNIQUE,
|
||||
bid_id NUMERIC NOT NULL,
|
||||
lot NUMERIC,
|
||||
bid NUMERIC,
|
||||
guy BYTEA,
|
||||
@ -11,3 +11,6 @@ CREATE TABLE maker.dent (
|
||||
raw_log JSONB,
|
||||
UNIQUE (header_id, tx_idx, log_idx)
|
||||
);
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN dent_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1 +0,0 @@
|
||||
DROP TABLE maker.dent;
|
12
db/migrations/1535667935_create_pit_file.down.sql
Normal file
12
db/migrations/1535667935_create_pit_file.down.sql
Normal file
@ -0,0 +1,12 @@
|
||||
DROP TABLE maker.pit_file_ilk;
|
||||
DROP TABLE maker.pit_file_stability_fee;
|
||||
DROP TABLE maker.pit_file_debt_ceiling;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN pit_file_debt_ceiling_checked;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN pit_file_ilk_checked;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN pit_file_stability_fee_checked;
|
@ -30,4 +30,13 @@ CREATE TABLE maker.pit_file_debt_ceiling (
|
||||
tx_idx INTEGER NOT NULL,
|
||||
raw_log JSONB,
|
||||
UNIQUE (header_id, tx_idx, log_idx)
|
||||
);
|
||||
);
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN pit_file_debt_ceiling_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN pit_file_ilk_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN pit_file_stability_fee_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,3 +0,0 @@
|
||||
DROP TABLE maker.pit_file_ilk;
|
||||
DROP TABLE maker.pit_file_stability_fee;
|
||||
DROP TABLE maker.pit_file_debt_ceiling;
|
4
db/migrations/1536267596_create_vat_init.down.sql
Normal file
4
db/migrations/1536267596_create_vat_init.down.sql
Normal file
@ -0,0 +1,4 @@
|
||||
DROP TABLE maker.vat_init;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN vat_init_checked;
|
@ -6,4 +6,7 @@ CREATE TABLE maker.vat_init (
|
||||
tx_idx INTEGER NOT NUll,
|
||||
raw_log JSONB,
|
||||
UNIQUE (header_id, tx_idx, log_idx)
|
||||
);
|
||||
);
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN vat_init_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1 +0,0 @@
|
||||
DROP TABLE maker.vat_init;
|
12
db/migrations/1536603967_create_drip_file.down.sql
Normal file
12
db/migrations/1536603967_create_drip_file.down.sql
Normal file
@ -0,0 +1,12 @@
|
||||
DROP TABLE maker.drip_file_ilk;
|
||||
DROP TABLE maker.drip_file_repo;
|
||||
DROP TABLE maker.drip_file_vow;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN drip_file_ilk_checked;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN drip_file_repo_checked;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN drip_file_vow_checked;
|
@ -30,4 +30,13 @@ CREATE TABLE maker.drip_file_vow (
|
||||
tx_idx INTEGER NOT NULL,
|
||||
raw_log JSONB,
|
||||
UNIQUE (header_id, tx_idx, log_idx)
|
||||
);
|
||||
);
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN drip_file_ilk_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN drip_file_repo_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN drip_file_vow_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,3 +0,0 @@
|
||||
DROP TABLE maker.drip_file_ilk;
|
||||
DROP TABLE maker.drip_file_repo;
|
||||
DROP TABLE maker.drip_file_vow;
|
4
db/migrations/1536615440_create_deal.down.sql
Normal file
4
db/migrations/1536615440_create_deal.down.sql
Normal file
@ -0,0 +1,4 @@
|
||||
DROP TABLE maker.deal;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN deal_checked;
|
@ -7,4 +7,7 @@ CREATE TABLE maker.deal (
|
||||
tx_idx INTEGER NOT NUll,
|
||||
raw_log JSONB,
|
||||
UNIQUE (header_id, tx_idx, log_idx)
|
||||
);
|
||||
);
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN deal_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1 +0,0 @@
|
||||
DROP TABLE maker.deal;
|
@ -2,7 +2,8 @@ CREATE OR REPLACE FUNCTION notify_pricefeed() RETURNS trigger AS $$
|
||||
BEGIN
|
||||
PERFORM pg_notify(
|
||||
CAST('postgraphile:price_feed' AS text),
|
||||
row_to_json(NEW)::text);
|
||||
json_build_object('__node__', json_build_array('price_feeds', NEW.id))::text
|
||||
);
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
4
db/migrations/1536710319_create_drip_drip.down.sql
Normal file
4
db/migrations/1536710319_create_drip_drip.down.sql
Normal file
@ -0,0 +1,4 @@
|
||||
DROP TABLE maker.drip_drip;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN drip_drip_checked;
|
@ -6,4 +6,7 @@ CREATE TABLE maker.drip_drip (
|
||||
tx_idx INTEGER NOT NUll,
|
||||
raw_log JSONB,
|
||||
UNIQUE (header_id, tx_idx, log_idx)
|
||||
);
|
||||
);
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN drip_drip_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1 +0,0 @@
|
||||
DROP TABLE maker.drip_drip;
|
12
db/migrations/1536765047_create_cat_file.down.sql
Normal file
12
db/migrations/1536765047_create_cat_file.down.sql
Normal file
@ -0,0 +1,12 @@
|
||||
DROP TABLE maker.cat_file_chop_lump;
|
||||
DROP TABLE maker.cat_file_flip;
|
||||
DROP TABLE maker.cat_file_pit_vow;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN cat_file_chop_lump_checked;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN cat_file_flip_checked;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN cat_file_pit_vow_checked;
|
@ -31,4 +31,13 @@ CREATE TABLE maker.cat_file_pit_vow (
|
||||
log_idx INTEGER NOT NULL,
|
||||
raw_log JSONB,
|
||||
UNIQUE (header_id, tx_idx, log_idx)
|
||||
);
|
||||
);
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN cat_file_chop_lump_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN cat_file_flip_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN cat_file_pit_vow_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,3 +0,0 @@
|
||||
DROP TABLE maker.cat_file_chop_lump;
|
||||
DROP TABLE maker.cat_file_flip;
|
||||
DROP TABLE maker.cat_file_pit_vow;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN deal_checked;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN deal_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN dent_checked;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN dent_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN flip_kick_checked;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN flip_kick_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN tend_checked;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN tend_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,6 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN cat_file_chop_lump_checked;
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN cat_file_flip_checked;
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN cat_file_pit_vow_checked;
|
@ -1,6 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN cat_file_chop_lump_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN cat_file_flip_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN cat_file_pit_vow_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,15 +0,0 @@
|
||||
DROP TRIGGER notify_pricefeeds ON maker.price_feeds;
|
||||
|
||||
CREATE OR REPLACE FUNCTION notify_pricefeed() RETURNS trigger AS $$
|
||||
BEGIN
|
||||
PERFORM pg_notify(
|
||||
CAST('postgraphile:price_feed' AS text),
|
||||
row_to_json(NEW)::text);
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
CREATE TRIGGER notify_pricefeeds
|
||||
AFTER INSERT ON maker.price_feeds
|
||||
FOR EACH ROW
|
||||
EXECUTE PROCEDURE notify_pricefeed();
|
@ -1,16 +0,0 @@
|
||||
DROP TRIGGER notify_pricefeeds ON maker.price_feeds;
|
||||
|
||||
CREATE OR REPLACE FUNCTION notify_pricefeed() RETURNS trigger AS $$
|
||||
BEGIN
|
||||
PERFORM pg_notify(
|
||||
CAST('postgraphile:price_feed' AS text),
|
||||
json_build_object('__node__', json_build_array('price_feeds', NEW.id))::text
|
||||
);
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
CREATE TRIGGER notify_pricefeeds
|
||||
AFTER INSERT ON maker.price_feeds
|
||||
FOR EACH ROW
|
||||
EXECUTE PROCEDURE notify_pricefeed();
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN bite_checked;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN bite_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN drip_drip_checked;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN drip_drip_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,6 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN drip_file_ilk_checked;
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN drip_file_repo_checked;
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN drip_file_vow_checked;
|
@ -1,6 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN drip_file_ilk_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN drip_file_repo_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN drip_file_vow_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN frob_checked;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN frob_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,6 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN pit_file_debt_ceiling_checked;
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN pit_file_ilk_checked;
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN pit_file_stability_fee_checked;
|
@ -1,6 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN pit_file_debt_ceiling_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN pit_file_ilk_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN pit_file_stability_fee_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN vat_init_checked;
|
@ -1,2 +0,0 @@
|
||||
ALTER TABLE public.checked_headers
|
||||
ADD COLUMN vat_init_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
@ -1,5 +0,0 @@
|
||||
ALTER TABLE maker.tend
|
||||
add constraint tend_bid_id_key unique (bid_id);
|
||||
|
||||
ALTER TABLE maker.dent
|
||||
add constraint dent_bid_id_key unique (bid_id);
|
@ -1,5 +0,0 @@
|
||||
ALTER TABLE maker.tend
|
||||
drop constraint tend_bid_id_key;
|
||||
|
||||
ALTER TABLE maker.dent
|
||||
drop constraint dent_bid_id_key;
|
@ -1,3 +1,3 @@
|
||||
DROP TABLE maker.vat_heal;
|
||||
ALTER TABLE public.checked_headers
|
||||
DROP COLUMN vat_heal_checked BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
DROP COLUMN vat_heal_checked;
|
||||
|
@ -1161,24 +1161,24 @@ CREATE TABLE public.checked_headers (
|
||||
id integer NOT NULL,
|
||||
header_id integer NOT NULL,
|
||||
price_feeds_checked boolean DEFAULT false NOT NULL,
|
||||
flop_kick_checked boolean DEFAULT false NOT NULL,
|
||||
deal_checked boolean DEFAULT false NOT NULL,
|
||||
dent_checked boolean DEFAULT false NOT NULL,
|
||||
flip_kick_checked boolean DEFAULT false NOT NULL,
|
||||
tend_checked boolean DEFAULT false NOT NULL,
|
||||
cat_file_chop_lump_checked boolean DEFAULT false NOT NULL,
|
||||
cat_file_flip_checked boolean DEFAULT false NOT NULL,
|
||||
cat_file_pit_vow_checked boolean DEFAULT false NOT NULL,
|
||||
bite_checked boolean DEFAULT false NOT NULL,
|
||||
drip_drip_checked boolean DEFAULT false NOT NULL,
|
||||
drip_file_ilk_checked boolean DEFAULT false NOT NULL,
|
||||
drip_file_repo_checked boolean DEFAULT false NOT NULL,
|
||||
drip_file_vow_checked boolean DEFAULT false NOT NULL,
|
||||
frob_checked boolean DEFAULT false NOT NULL,
|
||||
tend_checked boolean DEFAULT false NOT NULL,
|
||||
bite_checked boolean DEFAULT false NOT NULL,
|
||||
dent_checked boolean DEFAULT false NOT NULL,
|
||||
pit_file_debt_ceiling_checked boolean DEFAULT false NOT NULL,
|
||||
pit_file_ilk_checked boolean DEFAULT false NOT NULL,
|
||||
pit_file_stability_fee_checked boolean DEFAULT false NOT NULL,
|
||||
vat_init_checked boolean DEFAULT false NOT NULL,
|
||||
drip_file_ilk_checked boolean DEFAULT false NOT NULL,
|
||||
drip_file_repo_checked boolean DEFAULT false NOT NULL,
|
||||
drip_file_vow_checked boolean DEFAULT false NOT NULL,
|
||||
deal_checked boolean DEFAULT false NOT NULL,
|
||||
drip_drip_checked boolean DEFAULT false NOT NULL,
|
||||
cat_file_chop_lump_checked boolean DEFAULT false NOT NULL,
|
||||
cat_file_flip_checked boolean DEFAULT false NOT NULL,
|
||||
cat_file_pit_vow_checked boolean DEFAULT false NOT NULL,
|
||||
flop_kick_checked boolean DEFAULT false NOT NULL,
|
||||
vat_move_checked boolean DEFAULT false NOT NULL,
|
||||
vat_fold_checked boolean DEFAULT false NOT NULL,
|
||||
vat_heal_checked boolean DEFAULT false NOT NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user