From 396cbd6bd337fbef3906105f1a654538b0f5fa2c Mon Sep 17 00:00:00 2001 From: Lai Jiang Date: Thu, 1 Aug 2024 13:07:03 -0400 Subject: [PATCH] Remove login_email_address from RegistrarPoc (part 2) (#2510) Remove the field from the schema. --- .../sql/er_diagram/brief_er_diagram.html | 414 +++++++++--------- .../sql/er_diagram/full_er_diagram.html | 150 +++---- db/src/main/resources/sql/flyway.txt | 1 + ...mail_address_column_from_registrar_poc.sql | 15 + .../resources/sql/schema/nomulus.golden.sql | 10 +- 5 files changed, 285 insertions(+), 305 deletions(-) create mode 100644 db/src/main/resources/sql/flyway/V176__drop_login_email_address_column_from_registrar_poc.sql 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 e60a6ec04..3fef6b111 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 @@ td.section { generated on - 2024-07-30 18:27:56 + 2024-07-31 14:38:11 last flyway file - V175__user_update_history_id.sql + V176__drop_login_email_address_column_from_registrar_poc.sql @@ -280,7 +280,7 @@ td.section { generated by SchemaCrawler 16.21.4 generated on - 2024-07-30 18:27:56 + 2024-07-31 14:38:11 @@ -348,96 +348,96 @@ td.section { <title> billingevent_a57d1815:w->allocationtoken_a08ccbef:e - + - - - - - fk_billing_event_allocation_token + + + + + fk_billing_event_allocation_token domainhistory_a54cc226 - - public."DomainHistory" - - [table] - history_revision_id - - int8 not null - history_registrar_id - - text - history_modification_time - - timestamptz not null - history_type - - text not null - creation_time - - timestamptz - domain_repo_id - - text not null - current_package_token - - text - + + public."DomainHistory" + + [table] + history_revision_id + + int8 not null + history_registrar_id + + text + history_modification_time + + timestamptz not null + history_type + + text not null + creation_time + + timestamptz + domain_repo_id + + text not null + current_package_token + + text + billingevent_a57d1815:w->domainhistory_a54cc226:e - + - - - - + + + + fk_billing_event_domain_history billingevent_a57d1815:w->domainhistory_a54cc226:e - - - - - - - - fk_billing_event_domain_history + + + + + + + + fk_billing_event_domain_history billingevent_a57d1815:w->domainhistory_a54cc226:e - + - - - - + + + + fk_billing_event_recurrence_history billingevent_a57d1815:w->domainhistory_a54cc226:e - + - - - - + + + + fk_billing_event_recurrence_history @@ -510,14 +510,14 @@ td.section { billingevent_a57d1815:w->registrar_6e1503e3:e - + - fk_billing_event_registrar_id + fk_billing_event_registrar_id @@ -596,14 +596,14 @@ td.section { <title> domain_6c51cffa:w->allocationtoken_a08ccbef:e - + - fk_domain_current_package_token + fk_domain_current_package_token @@ -656,27 +656,27 @@ td.section { <title> domain_6c51cffa:w->billingcancellation_6eedf614:e - + - fk_domain_transfer_billing_cancellation_id + fk_domain_transfer_billing_cancellation_id domain_6c51cffa:w->billingrecurrence_5fa2cb01:e - - - + + + - fk_domain_billing_recurrence_id + fk_domain_billing_recurrence_id @@ -878,22 +878,22 @@ td.section { <title> domainhistory_a54cc226:w->allocationtoken_a08ccbef:e - - - - + + + + - fk_domain_history_current_package_token + fk_domain_history_current_package_token domainhistory_a54cc226:w->domain_6c51cffa:e - - - + + + @@ -904,9 +904,9 @@ td.section { domainhistory_a54cc226:w->registrar_6e1503e3:e - - - + + + @@ -917,7 +917,7 @@ td.section { billingcancellation_6eedf614:w->billingevent_a57d1815:e - + @@ -930,26 +930,26 @@ td.section { billingcancellation_6eedf614:w->domainhistory_a54cc226:e - + - - - - - fk_billing_cancellation_domain_history + + + + + fk_billing_cancellation_domain_history billingcancellation_6eedf614:w->domainhistory_a54cc226:e - + - - - - + + + + fk_billing_cancellation_domain_history @@ -1059,27 +1059,27 @@ td.section { billingrecurrence_5fa2cb01:w->domainhistory_a54cc226:e - + - - - - + + + + fk_billing_recurrence_domain_history billingrecurrence_5fa2cb01:w->domainhistory_a54cc226:e - + - - - - - fk_billing_recurrence_domain_history + + + + + fk_billing_recurrence_domain_history @@ -1440,26 +1440,26 @@ td.section { <title> pollmessage_614a523e:w->domainhistory_a54cc226:e - + - - - - + + + + fk_poll_message_domain_history pollmessage_614a523e:w->domainhistory_a54cc226:e - + - - - - + + + + fk_poll_message_domain_history @@ -1625,20 +1625,20 @@ td.section { pollmessage_614a523e:w->registrar_6e1503e3:e - + - fk_poll_message_transfer_response_gaining_registrar_id + fk_poll_message_transfer_response_gaining_registrar_id pollmessage_614a523e:w->registrar_6e1503e3:e - + @@ -1768,14 +1768,14 @@ td.section { host_f21b78de:w->domain_6c51cffa:e - - - + + + - fk_host_superordinate_domain + fk_host_superordinate_domain @@ -1839,26 +1839,26 @@ td.section { <title> domaindsdatahistory_995b060d:w->domainhistory_a54cc226:e - + - - - - + + + + fko4ilgyyfnvppbpuivus565i0j domaindsdatahistory_995b060d:w->domainhistory_a54cc226:e - - - - - - - + + + + + + + fko4ilgyyfnvppbpuivus565i0j @@ -1884,26 +1884,26 @@ td.section { domainhistoryhost_9f3f23ee:w->domainhistory_a54cc226:e - + - - - - + + + + fka9woh3hu8gx5x0vly6bai327n domainhistoryhost_9f3f23ee:w->domainhistory_a54cc226:e - + - - - - + + + + fka9woh3hu8gx5x0vly6bai327n @@ -1934,33 +1934,33 @@ td.section { domaintransactionrecord_6e77ff61:w->domainhistory_a54cc226:e - + - - - - + + + + fkcjqe54u72kha71vkibvxhjye7 domaintransactionrecord_6e77ff61:w->domainhistory_a54cc226:e - + - - - - + + + + fkcjqe54u72kha71vkibvxhjye7 domaintransactionrecord_6e77ff61:w->tld_f1fa57e2:e - + @@ -1992,27 +1992,27 @@ td.section { graceperiodhistory_40ccc1f1:w->domainhistory_a54cc226:e - + - - - - + + + + fk7w3cx8d55q8bln80e716tr7b8 graceperiodhistory_40ccc1f1:w->domainhistory_a54cc226:e - - + + - - - - - fk7w3cx8d55q8bln80e716tr7b8 + + + + + fk7w3cx8d55q8bln80e716tr7b8 @@ -2157,28 +2157,25 @@ td.section { <title> registrarpoc_ab47054d - - public."RegistrarPoc" - - [table] - email_address - - text not null - registrar_id - - text not null - login_email_address - - text - + + public."RegistrarPoc" + + [table] + email_address + + text not null + registrar_id + + text not null + registrarpoc_ab47054d:w->registrar_6e1503e3:e - - - + + + @@ -2208,27 +2205,27 @@ td.section { registrarupdatehistory_8a38bed4:w->registrar_6e1503e3:e - - - - - - - - fkregistrarupdatehistoryregistrarid + + + + + + + + fkregistrarupdatehistoryregistrarid registrarupdatehistory_8a38bed4:w->user_f2216f01:e - - - + + + - fksr7w342s7x5s5jvdti2axqeq8 + fksr7w342s7x5s5jvdti2axqeq8 @@ -2269,27 +2266,27 @@ td.section { <title> registrarpocupdatehistory_31e5d9aa:w->registrarpoc_ab47054d:e - + - - - - + + + + fkregistrarpocupdatehistoryemailaddress registrarpocupdatehistory_31e5d9aa:w->user_f2216f01:e - - - - - - - - fkftpbwctxtkc1i0njc0tdcaa2g + + + + + + + + fkftpbwctxtkc1i0njc0tdcaa2g @@ -6145,11 +6142,6 @@ td.section { <td class="minwidth"><b><i>registrar_id</i></b></td> <td class="minwidth">text not null</td> </tr> - <tr> - <td class="spacer"></td> - <td class="minwidth">login_email_address</td> - <td class="minwidth">text</td> - </tr> <tr> <td colspan="3"></td> </tr> 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 af00bbee6..0c462d504 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 @@ td.section { </tr> <tr> <td class="property_name">generated on</td> - <td class="property_value">2024-07-30 18:27:55</td> + <td class="property_value">2024-07-31 14:38:09</td> </tr> <tr> <td class="property_name">last flyway file</td> - <td id="lastFlywayFile" class="property_value">V175__user_update_history_id.sql</td> + <td id="lastFlywayFile" class="property_value">V176__drop_login_email_address_column_from_registrar_poc.sql</td> </tr> </tbody> </table> @@ -280,7 +280,7 @@ td.section { <text text-anchor="start" x="4494" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated by</text> <text text-anchor="start" x="4577" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">SchemaCrawler 16.21.4</text> <text text-anchor="start" x="4493" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated on</text> - <text text-anchor="start" x="4577" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2024-07-30 18:27:55</text> + <text text-anchor="start" x="4577" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2024-07-31 14:38:09</text> <polygon fill="none" stroke="#888888" points="4490,-4 4490,-44 4726,-44 4726,-4 4490,-4" /> <!-- allocationtoken_a08ccbef --> <g id="node1" class="node"> <title> @@ -3425,61 +3425,58 @@ td.section { <title> registrarpoc_ab47054d - - public."RegistrarPoc" - - [table] - email_address - - text not null - allowed_to_set_registry_lock_password - - bool not null - fax_number - - text - name - - text - phone_number - - text - registry_lock_password_hash - - text - registry_lock_password_salt - - text - types - - _text - visible_in_domain_whois_as_abuse - - bool not null - visible_in_whois_as_admin - - bool not null - visible_in_whois_as_tech - - bool not null - registry_lock_email_address - - text - registrar_id - - text not null - login_email_address - - text - + + public."RegistrarPoc" + + [table] + email_address + + text not null + allowed_to_set_registry_lock_password + + bool not null + fax_number + + text + name + + text + phone_number + + text + registry_lock_password_hash + + text + registry_lock_password_salt + + text + types + + _text + visible_in_domain_whois_as_abuse + + bool not null + visible_in_whois_as_admin + + bool not null + visible_in_whois_as_tech + + bool not null + registry_lock_email_address + + text + registrar_id + + text not null + registrarpoc_ab47054d:w->registrar_6e1503e3:e - - - + + + @@ -3659,14 +3656,14 @@ td.section { registrarupdatehistory_8a38bed4:w->registrar_6e1503e3:e - - - + + + - fkregistrarupdatehistoryregistrarid + fkregistrarupdatehistoryregistrarid @@ -3758,26 +3755,26 @@ td.section { <title> registrarpocupdatehistory_31e5d9aa:w->registrarpoc_ab47054d:e - + - - - - - fkregistrarpocupdatehistoryemailaddress + + + + + fkregistrarpocupdatehistoryemailaddress registrarpocupdatehistory_31e5d9aa:w->registrarpoc_ab47054d:e - + - - - - + + + + fkregistrarpocupdatehistoryemailaddress @@ -11362,11 +11359,6 @@ td.section { registrar_id text not null - - - login_email_address - text - @@ -11434,18 +11426,6 @@ td.section { - - registrarpoc_login_email_idx - [non-unique index] - - - - login_email_address - ascending - - - - "RegistrarPoc_pkey" [unique index] diff --git a/db/src/main/resources/sql/flyway.txt b/db/src/main/resources/sql/flyway.txt index e9799dcfe..626c4f5ad 100644 --- a/db/src/main/resources/sql/flyway.txt +++ b/db/src/main/resources/sql/flyway.txt @@ -173,3 +173,4 @@ V172__allocation_token_renewal_price.sql V173__create_feature_flag_table.sql V174__user_pkey.sql V175__user_update_history_id.sql +V176__drop_login_email_address_column_from_registrar_poc.sql diff --git a/db/src/main/resources/sql/flyway/V176__drop_login_email_address_column_from_registrar_poc.sql b/db/src/main/resources/sql/flyway/V176__drop_login_email_address_column_from_registrar_poc.sql new file mode 100644 index 000000000..ef33061de --- /dev/null +++ b/db/src/main/resources/sql/flyway/V176__drop_login_email_address_column_from_registrar_poc.sql @@ -0,0 +1,15 @@ +-- Copyright 2024 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. + +alter table "RegistrarPoc" drop column login_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 400bad24f..2f6bdc288 100644 --- a/db/src/main/resources/sql/schema/nomulus.golden.sql +++ b/db/src/main/resources/sql/schema/nomulus.golden.sql @@ -986,8 +986,7 @@ CREATE TABLE public."RegistrarPoc" ( visible_in_whois_as_admin boolean NOT NULL, visible_in_whois_as_tech boolean NOT NULL, registry_lock_email_address text, - registrar_id text NOT NULL, - login_email_address text + registrar_id text NOT NULL ); @@ -2512,13 +2511,6 @@ CREATE INDEX registrar_iana_identifier_idx ON public."Registrar" USING btree (ia CREATE INDEX registrar_name_idx ON public."Registrar" USING btree (registrar_name); --- --- Name: registrarpoc_login_email_idx; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX registrarpoc_login_email_idx ON public."RegistrarPoc" USING btree (login_email_address); - - -- -- Name: reservedlist_name_idx; Type: INDEX; Schema: public; Owner: - --