From ed1ed979b31553f43890324ec4ef2d42744036a4 Mon Sep 17 00:00:00 2001 From: Elizabeth Date: Tue, 9 Oct 2018 14:32:23 -0500 Subject: [PATCH] Remove bid_id unique constraint for Tend and Dent (#48) --- ...0167_remove_bid_id_unique_constraint.down.sql | 5 +++++ ...580167_remove_bid_id_unique_constraint.up.sql | 5 +++++ db/schema.sql | 16 ---------------- 3 files changed, 10 insertions(+), 16 deletions(-) create mode 100644 db/migrations/1538580167_remove_bid_id_unique_constraint.down.sql create mode 100644 db/migrations/1538580167_remove_bid_id_unique_constraint.up.sql diff --git a/db/migrations/1538580167_remove_bid_id_unique_constraint.down.sql b/db/migrations/1538580167_remove_bid_id_unique_constraint.down.sql new file mode 100644 index 00000000..33dc29cb --- /dev/null +++ b/db/migrations/1538580167_remove_bid_id_unique_constraint.down.sql @@ -0,0 +1,5 @@ +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); diff --git a/db/migrations/1538580167_remove_bid_id_unique_constraint.up.sql b/db/migrations/1538580167_remove_bid_id_unique_constraint.up.sql new file mode 100644 index 00000000..65af04c3 --- /dev/null +++ b/db/migrations/1538580167_remove_bid_id_unique_constraint.up.sql @@ -0,0 +1,5 @@ +ALTER TABLE maker.tend + drop constraint tend_bid_id_key; + +ALTER TABLE maker.dent + drop constraint dent_bid_id_key; diff --git a/db/schema.sql b/db/schema.sql index 5d950abf..ff8c6e35 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -1477,14 +1477,6 @@ ALTER TABLE ONLY maker.deal ADD CONSTRAINT deal_pkey PRIMARY KEY (id); --- --- Name: dent dent_bid_id_key; Type: CONSTRAINT; Schema: maker; Owner: - --- - -ALTER TABLE ONLY maker.dent - ADD CONSTRAINT dent_bid_id_key UNIQUE (bid_id); - - -- -- Name: dent dent_header_id_tx_idx_key; Type: CONSTRAINT; Schema: maker; Owner: - -- @@ -1677,14 +1669,6 @@ ALTER TABLE ONLY maker.price_feeds ADD CONSTRAINT price_feeds_pkey PRIMARY KEY (id); --- --- Name: tend tend_bid_id_key; Type: CONSTRAINT; Schema: maker; Owner: - --- - -ALTER TABLE ONLY maker.tend - ADD CONSTRAINT tend_bid_id_key UNIQUE (bid_id); - - -- -- Name: tend tend_header_id_tx_idx_key; Type: CONSTRAINT; Schema: maker; Owner: - --