mirror of
https://github.com/google/nomulus.git
synced 2025-05-22 12:19:35 +02:00
Make index on contactId not unique (#751)
* Make index on contactId not unique This column cannot be unique due to the fundamantal design of the domain model.
This commit is contained in:
parent
f7d03de745
commit
05ddabd003
4 changed files with 27 additions and 12 deletions
|
@ -40,7 +40,7 @@ import org.joda.time.DateTime;
|
|||
@javax.persistence.Index(columnList = "creationTime"),
|
||||
@javax.persistence.Index(columnList = "currentSponsorRegistrarId"),
|
||||
@javax.persistence.Index(columnList = "deletionTime"),
|
||||
@javax.persistence.Index(columnList = "contactId", unique = true),
|
||||
@javax.persistence.Index(columnList = "contactId"),
|
||||
@javax.persistence.Index(columnList = "searchName")
|
||||
})
|
||||
@ExternalMessagingName("contact")
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
-- Copyright 2020 The Nomulus Authors. All Rights Reserved.
|
||||
--
|
||||
-- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-- you may not use this file except in compliance with the License.
|
||||
-- You may obtain a copy of the License at
|
||||
--
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
--
|
||||
-- Unless required by applicable law or agreed to in writing, software
|
||||
-- distributed under the License is distributed on an "AS IS" BASIS,
|
||||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
-- See the License for the specific language governing permissions and
|
||||
-- limitations under the License.
|
||||
|
||||
create index IDXoqd7n4hbx86hvlgkilq75olas on "Contact" (contact_id);
|
||||
|
||||
alter table if exists "Contact"
|
||||
drop constraint if exists ukoqd7n4hbx86hvlgkilq75olas cascade;
|
|
@ -580,10 +580,8 @@ create index IDXjny8wuot75b5e6p38r47wdawu on "BillingRecurrence" (recurrence_tim
|
|||
create index IDX3y752kr9uh4kh6uig54vemx0l on "Contact" (creation_time);
|
||||
create index IDXtm415d6fe1rr35stm33s5mg18 on "Contact" (current_sponsor_registrar_id);
|
||||
create index IDXn1f711wicdnooa2mqb7g1m55o on "Contact" (deletion_time);
|
||||
create index IDXoqd7n4hbx86hvlgkilq75olas on "Contact" (contact_id);
|
||||
create index IDX1p3esngcwwu6hstyua6itn6ff on "Contact" (search_name);
|
||||
|
||||
alter table if exists "Contact"
|
||||
add constraint UKoqd7n4hbx86hvlgkilq75olas unique (contact_id);
|
||||
create index IDXo1xdtpij2yryh0skxe9v91sep on "ContactHistory" (creation_time);
|
||||
create index IDXhp33wybmb6tbpr1bq7ttwk8je on "ContactHistory" (history_registrar_id);
|
||||
create index IDX9q53px6r302ftgisqifmc6put on "ContactHistory" (history_type);
|
||||
|
|
|
@ -1183,14 +1183,6 @@ ALTER TABLE ONLY public."RegistryLock"
|
|||
ADD CONSTRAINT idx_registry_lock_repo_id_revision_id UNIQUE (repo_id, revision_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: Contact ukoqd7n4hbx86hvlgkilq75olas; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."Contact"
|
||||
ADD CONSTRAINT ukoqd7n4hbx86hvlgkilq75olas UNIQUE (contact_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idx1iy7njgb7wjmj9piml4l2g0qi; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -1415,6 +1407,13 @@ CREATE INDEX idxn898pb9mwcg359cdwvolb11ck ON public."BillingRecurrence" USING bt
|
|||
CREATE INDEX idxo1xdtpij2yryh0skxe9v91sep ON public."ContactHistory" USING btree (creation_time);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idxoqd7n4hbx86hvlgkilq75olas; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idxoqd7n4hbx86hvlgkilq75olas ON public."Contact" USING btree (contact_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idxp3usbtvk0v1m14i5tdp4xnxgc; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue