diff --git a/db/src/main/resources/sql/er_diagram/brief_er_diagram.html b/db/src/main/resources/sql/er_diagram/brief_er_diagram.html index 4fccb7d5f17..2f49fb58471 100644 --- a/db/src/main/resources/sql/er_diagram/brief_er_diagram.html +++ b/db/src/main/resources/sql/er_diagram/brief_er_diagram.html @@ -261,11 +261,11 @@

System Information

generated on - 2026-07-06 17:57:29 + 2026-07-14 19:18:20 last flyway file - V224__add_registrar_expiry_access_period_enabled.sql + V225__user_registry_lock_email_address_index.sql @@ -273,9 +273,9 @@

System Information

 

- SchemaCrawler_Diagram generated by SchemaCrawler 17.11.1 generated on 2026-07-06 17:57:29 + SchemaCrawler_Diagram generated by SchemaCrawler 17.11.1 generated on 2026-07-14 19:18:20 - allocationtoken_a08ccbef public."AllocationToken" [table] token text not null domain_name text redemption_domain_repo_id text token_type text + allocationtoken_a08ccbef public."AllocationToken" [table] token text not null domain_name text redemption_domain_repo_id text token_type text @@ -283,23 +283,23 @@

System Information

- billingevent_a57d1815:w->allocationtoken_a08ccbef:e fk_billing_event_allocation_token + billingevent_a57d1815:w->allocationtoken_a08ccbef:e fk_billing_event_allocation_token - billingrecurrence_5fa2cb01 public."BillingRecurrence" [table] billing_recurrence_id int8 not null registrar_id text not null domain_history_revision_id int8 not null domain_repo_id text not null event_time timestamptz not null recurrence_end_time timestamptz recurrence_time_of_year text recurrence_last_expansion timestamptz not null + billingrecurrence_5fa2cb01 public."BillingRecurrence" [table] billing_recurrence_id int8 not null registrar_id text not null domain_history_revision_id int8 not null domain_repo_id text not null event_time timestamptz not null recurrence_end_time timestamptz recurrence_time_of_year text recurrence_last_expansion timestamptz not null - billingevent_a57d1815:w->billingrecurrence_5fa2cb01:e fk_billing_event_cancellation_matching_billing_recurrence_id + billingevent_a57d1815:w->billingrecurrence_5fa2cb01:e fk_billing_event_cancellation_matching_billing_recurrence_id - registrar_6e1503e3 public."Registrar" [table] registrar_id text not null iana_identifier int8 registrar_name text not null + registrar_6e1503e3 public."Registrar" [table] registrar_id text not null iana_identifier int8 registrar_name text not null - billingevent_a57d1815:w->registrar_6e1503e3:e fk_billing_event_registrar_id + billingevent_a57d1815:w->registrar_6e1503e3:e fk_billing_event_registrar_id @@ -307,7 +307,7 @@

System Information

- domain_6c51cffa:w->allocationtoken_a08ccbef:e fk_domain_current_package_token + domain_6c51cffa:w->allocationtoken_a08ccbef:e fk_domain_current_package_token @@ -323,31 +323,31 @@

System Information

- domain_6c51cffa:w->billingrecurrence_5fa2cb01:e fk_domain_billing_recurrence_id + domain_6c51cffa:w->billingrecurrence_5fa2cb01:e fk_domain_billing_recurrence_id - domain_6c51cffa:w->billingrecurrence_5fa2cb01:e fk_domain_transfer_billing_recurrence_id + domain_6c51cffa:w->billingrecurrence_5fa2cb01:e fk_domain_transfer_billing_recurrence_id - domain_6c51cffa:w->registrar_6e1503e3:e fk2jc69qyg2tv9hhnmif6oa1cx1 + domain_6c51cffa:w->registrar_6e1503e3:e fk2jc69qyg2tv9hhnmif6oa1cx1 - domain_6c51cffa:w->registrar_6e1503e3:e fk2u3srsfbei272093m3b3xwj23 + domain_6c51cffa:w->registrar_6e1503e3:e fk2u3srsfbei272093m3b3xwj23 - domain_6c51cffa:w->registrar_6e1503e3:e fkjc0r9r5y1lfbt4gpbqw4wsuvq + domain_6c51cffa:w->registrar_6e1503e3:e fkjc0r9r5y1lfbt4gpbqw4wsuvq - domain_6c51cffa:w->registrar_6e1503e3:e fk_domain_transfer_gaining_registrar_id + domain_6c51cffa:w->registrar_6e1503e3:e fk_domain_transfer_gaining_registrar_id - domain_6c51cffa:w->registrar_6e1503e3:e fk_domain_transfer_losing_registrar_id + domain_6c51cffa:w->registrar_6e1503e3:e fk_domain_transfer_losing_registrar_id @@ -363,7 +363,7 @@

System Information

- domainhistory_a54cc226:w->allocationtoken_a08ccbef:e fk_domain_history_current_package_token + domainhistory_a54cc226:w->allocationtoken_a08ccbef:e fk_domain_history_current_package_token @@ -371,7 +371,7 @@

System Information

- domainhistory_a54cc226:w->registrar_6e1503e3:e fk_domain_history_registrar_id + domainhistory_a54cc226:w->registrar_6e1503e3:e fk_domain_history_registrar_id @@ -379,11 +379,11 @@

System Information

- billingcancellation_6eedf614:w->billingrecurrence_5fa2cb01:e fk_billing_cancellation_billing_recurrence_id + billingcancellation_6eedf614:w->billingrecurrence_5fa2cb01:e fk_billing_cancellation_billing_recurrence_id - billingcancellation_6eedf614:w->registrar_6e1503e3:e fk_billing_cancellation_registrar_id + billingcancellation_6eedf614:w->registrar_6e1503e3:e fk_billing_cancellation_registrar_id @@ -399,15 +399,15 @@

System Information

- graceperiod_cd3b2e8f:w->billingrecurrence_5fa2cb01:e fk_grace_period_billing_recurrence_id + graceperiod_cd3b2e8f:w->billingrecurrence_5fa2cb01:e fk_grace_period_billing_recurrence_id - graceperiod_cd3b2e8f:w->registrar_6e1503e3:e fk_grace_period_registrar_id + graceperiod_cd3b2e8f:w->registrar_6e1503e3:e fk_grace_period_registrar_id - billingrecurrence_5fa2cb01:w->registrar_6e1503e3:e fk_billing_recurrence_registrar_id + billingrecurrence_5fa2cb01:w->registrar_6e1503e3:e fk_billing_recurrence_registrar_id @@ -451,11 +451,11 @@

System Information

- user_f2216f01 public."User" [table] email_address text not null + user_f2216f01 public."User" [table] email_address text not null registry_lock_email_address text - consoleupdatehistory_5237b2aa:w->user_f2216f01:e fk_console_update_history_acting_user + consoleupdatehistory_5237b2aa:w->user_f2216f01:e fk_console_update_history_acting_user @@ -495,15 +495,15 @@

System Information

- host_f21b78de:w->registrar_6e1503e3:e fk_host_creation_registrar_id + host_f21b78de:w->registrar_6e1503e3:e fk_host_creation_registrar_id - host_f21b78de:w->registrar_6e1503e3:e fk_host_current_sponsor_registrar_id + host_f21b78de:w->registrar_6e1503e3:e fk_host_current_sponsor_registrar_id - host_f21b78de:w->registrar_6e1503e3:e fk_host_last_epp_update_registrar_id + host_f21b78de:w->registrar_6e1503e3:e fk_host_last_epp_update_registrar_id @@ -531,15 +531,15 @@

System Information

- pollmessage_614a523e:w->registrar_6e1503e3:e fk_poll_message_registrar_id + pollmessage_614a523e:w->registrar_6e1503e3:e fk_poll_message_registrar_id - pollmessage_614a523e:w->registrar_6e1503e3:e fk_poll_message_transfer_response_gaining_registrar_id + pollmessage_614a523e:w->registrar_6e1503e3:e fk_poll_message_transfer_response_gaining_registrar_id - pollmessage_614a523e:w->registrar_6e1503e3:e fk_poll_message_transfer_response_losing_registrar_id + pollmessage_614a523e:w->registrar_6e1503e3:e fk_poll_message_transfer_response_losing_registrar_id @@ -579,7 +579,7 @@

System Information

- hosthistory_56210c2:w->registrar_6e1503e3:e fk_history_registrar_id + hosthistory_56210c2:w->registrar_6e1503e3:e fk_history_registrar_id @@ -615,7 +615,7 @@

System Information

- registrarpoc_ab47054d:w->registrar_6e1503e3:e fk_registrar_poc_registrar_id + registrarpoc_ab47054d:w->registrar_6e1503e3:e fk_registrar_poc_registrar_id @@ -623,7 +623,7 @@

System Information

- registrarupdatehistory_8a38bed4:w->registrar_6e1503e3:e fkregistrarupdatehistoryregistrarid + registrarupdatehistory_8a38bed4:w->registrar_6e1503e3:e fkregistrarupdatehistoryregistrarid @@ -4378,6 +4378,11 @@

Tables

email_address text not null + + + registry_lock_email_address + text + diff --git a/db/src/main/resources/sql/er_diagram/full_er_diagram.html b/db/src/main/resources/sql/er_diagram/full_er_diagram.html index c7efadbb9ce..a0457de1b63 100644 --- a/db/src/main/resources/sql/er_diagram/full_er_diagram.html +++ b/db/src/main/resources/sql/er_diagram/full_er_diagram.html @@ -261,11 +261,11 @@

System Information

generated on - 2026-07-06 17:57:27 + 2026-07-14 19:18:19 last flyway file - V224__add_registrar_expiry_access_period_enabled.sql + V225__user_registry_lock_email_address_index.sql @@ -273,7 +273,7 @@

System Information

 

- SchemaCrawler_Diagram generated by SchemaCrawler 17.11.1 generated on 2026-07-06 17:57:27 + SchemaCrawler_Diagram generated by SchemaCrawler 17.11.1 generated on 2026-07-14 19:18:19 allocationtoken_a08ccbef public."AllocationToken" [table] token text not null update_timestamp timestamptz allowed_registrar_ids _text allowed_tlds _text creation_time timestamptz not null discount_fraction float8(17, 17) not null discount_premiums bool not null discount_years int4 not null domain_name text redemption_domain_repo_id text token_status_transitions hstore token_type text redemption_domain_history_id int8 renewal_price_behavior text not null registration_behavior text not null allowed_epp_actions _text renewal_price_amount numeric(19, 2) renewal_price_currency text discount_price_amount numeric(19, 2) discount_price_currency text @@ -9053,6 +9053,18 @@

Tables

email_address ascending + + + + + user_registry_lock_email_address_idx + [non-unique hashed index] + + + + registry_lock_email_address + unknown +

 

diff --git a/db/src/main/resources/sql/flyway.txt b/db/src/main/resources/sql/flyway.txt index c7823c18a69..c31dc8a4351 100644 --- a/db/src/main/resources/sql/flyway.txt +++ b/db/src/main/resources/sql/flyway.txt @@ -222,3 +222,4 @@ V221__remove_contact_history.sql V222__remove_contact.sql V223__tld_change_xap_enabled_to_transitions.sql V224__add_registrar_expiry_access_period_enabled.sql +V225__user_registry_lock_email_address_index.sql diff --git a/db/src/main/resources/sql/flyway/V225__user_registry_lock_email_address_index.sql b/db/src/main/resources/sql/flyway/V225__user_registry_lock_email_address_index.sql new file mode 100644 index 00000000000..b61039d411e --- /dev/null +++ b/db/src/main/resources/sql/flyway/V225__user_registry_lock_email_address_index.sql @@ -0,0 +1,16 @@ +-- Copyright 2026 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 CONCURRENTLY IF NOT EXISTS user_registry_lock_email_address_idx ON "User" + USING hash (registry_lock_email_address); diff --git a/db/src/main/resources/sql/schema/nomulus.golden.sql b/db/src/main/resources/sql/schema/nomulus.golden.sql index 27dc39a906b..09d6e86f536 100644 --- a/db/src/main/resources/sql/schema/nomulus.golden.sql +++ b/db/src/main/resources/sql/schema/nomulus.golden.sql @@ -2,8 +2,8 @@ -- PostgreSQL database dump -- --- Dumped from database version 17.4 --- Dumped by pg_dump version 17.4 +-- Dumped from database version 17.10 +-- Dumped by pg_dump version 17.10 SET statement_timeout = 0; SET lock_timeout = 0; @@ -2611,6 +2611,13 @@ CREATE INDEX spec11threatmatch_registrar_id_idx ON public."Spec11ThreatMatch" US CREATE INDEX spec11threatmatch_tld_idx ON public."Spec11ThreatMatch" USING btree (tld); +-- +-- Name: user_registry_lock_email_address_idx; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX user_registry_lock_email_address_idx ON public."User" USING hash (registry_lock_email_address); + + -- -- Name: Domain fk2jc69qyg2tv9hhnmif6oa1cx1; Type: FK CONSTRAINT; Schema: public; Owner: - --