Add SQL code for ConsoleUpdateHistory subclasses (#2337)

https://github.com/google/nomulus/pull/2330/ has an example of what this
will look like in Java
This commit is contained in:
gbrodman 2024-02-29 12:05:45 -05:00 committed by GitHub
parent af2a7540d9
commit 78c7d44546
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 6803 additions and 4275 deletions

View file

@ -90,7 +90,8 @@ PRESUBMITS = {
".git", "/build/", "/bin/generated-sources/", "/bin/generated-test-sources/", ".git", "/build/", "/bin/generated-sources/", "/bin/generated-test-sources/",
"node_modules/", "LoggerConfig.java", "registrar_bin.", "node_modules/", "LoggerConfig.java", "registrar_bin.",
"registrar_dbg.", "google-java-format-diff.py", "registrar_dbg.", "google-java-format-diff.py",
"nomulus.golden.sql", "soyutils_usegoog.js", "javascript/checks.js" "nomulus.golden.sql", "soyutils_usegoog.js", "javascript/checks.js",
"/src/main/generated", "/src/test/generated"
}, REQUIRED): }, REQUIRED):
"File did not include the license header.", "File did not include the license header.",

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -153,3 +153,8 @@ V152__add_bsa_domain_refresh_table.sql
V153__drop_bsa_domain_in_use_table.sql V153__drop_bsa_domain_in_use_table.sql
V154__add_create_billing_cost_transitions_to_tld.sql V154__add_create_billing_cost_transitions_to_tld.sql
V155__reserved_list_null_should_publish.sql V155__reserved_list_null_should_publish.sql
V156__console_update_history.sql
V157__console_epp_action_history_indexes.sql
V158__registrar_poc_update_history_indexes.sql
V159__registrar_update_history_indexes.sql
V160__user_update_history_indexes.sql

View file

@ -0,0 +1,149 @@
-- 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.
CREATE TABLE "ConsoleEppActionHistory" (
history_revision_id int8 NOT NULL,
history_date_time timestamptz NOT NULL,
history_method text NOT NULL,
history_request_body text,
history_type text NOT NULL,
history_url text NOT NULL,
history_entry_class text NOT NULL,
repo_id text NOT NULL,
revision_id int8 NOT NULL,
history_acting_user text NOT NULL,
PRIMARY KEY (history_revision_id),
CONSTRAINT FKb686b9os2nsjpv930npa4r3b4
FOREIGN KEY(history_acting_user)
REFERENCES "User" (email_address)
);
CREATE TABLE "RegistrarPocUpdateHistory" (
history_revision_id int8 NOT NULL,
history_date_time timestamptz NOT NULL,
history_method text NOT NULL,
history_request_body text,
history_type text NOT NULL,
history_url text NOT NULL,
email_address text NOT NULL,
registrar_id text NOT NULL,
allowed_to_set_registry_lock_password boolean NOT NULL,
fax_number text,
login_email_address text,
name text,
phone_number text,
registry_lock_email_address text,
registry_lock_password_hash text,
registry_lock_password_salt text,
types text[],
visible_in_domain_whois_as_abuse boolean NOT NULL,
visible_in_whois_as_admin boolean NOT NULL,
visible_in_whois_as_tech boolean NOT NULL,
history_acting_user text NOT NULL,
PRIMARY KEY (history_revision_id),
CONSTRAINT FKftpbwctxtkc1i0njc0tdcaa2g
FOREIGN KEY(history_acting_user)
REFERENCES "User" (email_address),
CONSTRAINT FKRegistrarPocUpdateHistoryEmailAddress
FOREIGN KEY(email_address, registrar_id)
REFERENCES "RegistrarPoc" (email_address, registrar_id)
);
CREATE TABLE "RegistrarUpdateHistory" (
history_revision_id int8 NOT NULL,
history_date_time timestamptz NOT NULL,
history_method text NOT NULL,
history_request_body text,
history_type text NOT NULL,
history_url text NOT NULL,
allowed_tlds text[],
billing_account_map hstore,
block_premium_names boolean NOT NULL,
client_certificate text,
client_certificate_hash text,
contacts_require_syncing boolean NOT NULL,
creation_time timestamptz NOT NULL,
drive_folder_id text,
email_address text,
failover_client_certificate text,
failover_client_certificate_hash text,
fax_number text,
iana_identifier int8,
icann_referral_email text,
i18n_address_city text,
i18n_address_country_code text,
i18n_address_state text,
i18n_address_street_line1 text,
i18n_address_street_line2 text,
i18n_address_street_line3 text,
i18n_address_zip text,
ip_address_allow_list text[],
last_certificate_update_time timestamptz,
last_expiring_cert_notification_sent_date timestamptz,
last_expiring_failover_cert_notification_sent_date timestamptz,
localized_address_city text,
localized_address_country_code text,
localized_address_state text,
localized_address_street_line1 text,
localized_address_street_line2 text,
localized_address_street_line3 text,
localized_address_zip text,
password_hash text,
phone_number text,
phone_passcode text,
po_number text,
rdap_base_urls text[],
registrar_name text NOT NULL,
registry_lock_allowed boolean NOT NULL,
password_salt text,
state text,
type text NOT NULL,
url text,
whois_server text,
update_timestamp timestamptz,
registrar_id text NOT NULL,
history_acting_user text NOT NULL,
PRIMARY KEY (history_revision_id),
CONSTRAINT FKsr7w342s7x5s5jvdti2axqeq8
FOREIGN KEY (history_acting_user)
REFERENCES "User" (email_address),
CONSTRAINT FKRegistrarUpdateHistoryRegistrarId
FOREIGN KEY (registrar_id)
REFERENCES "Registrar" (registrar_id)
);
CREATE TABLE "UserUpdateHistory" (
history_revision_id int8 NOT NULL,
history_date_time timestamptz NOT NULL,
history_method text NOT NULL,
history_request_body text,
history_type text NOT NULL,
history_url text NOT NULL,
user_id int8 NOT NULL,
email_address text NOT NULL,
registry_lock_password_hash text,
registry_lock_password_salt text,
global_role text NOT NULL,
is_admin boolean NOT NULL,
registrar_roles hstore,
update_timestamp timestamptz,
history_acting_user text NOT NULL,
PRIMARY KEY (history_revision_id),
CONSTRAINT FK1s7bopbl3pwrhv3jkkofnv3o0
FOREIGN KEY (history_acting_user)
REFERENCES "User" (email_address),
CONSTRAINT FKUserUpdateHistoryEmailAddress
FOREIGN KEY (email_address)
REFERENCES "User" (email_address)
);

View file

@ -0,0 +1,20 @@
-- 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.
CREATE INDEX IF NOT EXISTS IDXcclyb3n5gbex8u8m9fjlujitw
ON "ConsoleEppActionHistory" (history_acting_user);
CREATE INDEX IF NOT EXISTS IDX6y67d6wsffmr6jcxax5ghwqhd
ON "ConsoleEppActionHistory" (repo_id);
CREATE INDEX IF NOT EXISTS IDXiahqo1d1fqdfknywmj2xbxl7t
ON "ConsoleEppActionHistory" (revision_id);

View file

@ -0,0 +1,20 @@
-- 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.
CREATE INDEX IF NOT EXISTS IDXrn6posxkx58de1cp09g5257cw
ON "RegistrarPocUpdateHistory" (history_acting_user);
CREATE INDEX IF NOT EXISTS IDXr1cxua6it0rxgt9tpyugspxk
ON "RegistrarPocUpdateHistory" (email_address);
CREATE INDEX IF NOT EXISTS IDXfr24wvpg8qalwqy4pni7evrpj
ON "RegistrarPocUpdateHistory" (registrar_id);

View file

@ -0,0 +1,18 @@
-- 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.
CREATE INDEX IF NOT EXISTS IDXm6k18dusy2lfi5y81k8g256sa
ON "RegistrarUpdateHistory" (history_acting_user);
CREATE INDEX IF NOT EXISTS IDX3d1mucv7axrhud8w8jl4vsu62
ON "RegistrarUpdateHistory" (registrar_id);

View file

@ -0,0 +1,18 @@
-- 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.
CREATE INDEX IF NOT EXISTS IDXbjacjlm8ianc4kxxvamnu94k5
ON "UserUpdateHistory" (history_acting_user);
CREATE INDEX IF NOT EXISTS IDX5yqacw829y5bm6f7eajsq1cts
ON "UserUpdateHistory" (email_address);

View file

@ -249,6 +249,24 @@ CREATE SEQUENCE public."ClaimsList_revision_id_seq"
ALTER SEQUENCE public."ClaimsList_revision_id_seq" OWNED BY public."ClaimsList".revision_id; ALTER SEQUENCE public."ClaimsList_revision_id_seq" OWNED BY public."ClaimsList".revision_id;
--
-- Name: ConsoleEppActionHistory; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public."ConsoleEppActionHistory" (
history_revision_id bigint NOT NULL,
history_date_time timestamp with time zone NOT NULL,
history_method text NOT NULL,
history_request_body text,
history_type text NOT NULL,
history_url text NOT NULL,
history_entry_class text NOT NULL,
repo_id text NOT NULL,
revision_id bigint NOT NULL,
history_acting_user text NOT NULL
);
-- --
-- Name: Contact; Type: TABLE; Schema: public; Owner: - -- Name: Contact; Type: TABLE; Schema: public; Owner: -
-- --
@ -961,6 +979,96 @@ CREATE TABLE public."RegistrarPoc" (
); );
--
-- Name: RegistrarPocUpdateHistory; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public."RegistrarPocUpdateHistory" (
history_revision_id bigint NOT NULL,
history_date_time timestamp with time zone NOT NULL,
history_method text NOT NULL,
history_request_body text,
history_type text NOT NULL,
history_url text NOT NULL,
email_address text NOT NULL,
registrar_id text NOT NULL,
allowed_to_set_registry_lock_password boolean NOT NULL,
fax_number text,
login_email_address text,
name text,
phone_number text,
registry_lock_email_address text,
registry_lock_password_hash text,
registry_lock_password_salt text,
types text[],
visible_in_domain_whois_as_abuse boolean NOT NULL,
visible_in_whois_as_admin boolean NOT NULL,
visible_in_whois_as_tech boolean NOT NULL,
history_acting_user text NOT NULL
);
--
-- Name: RegistrarUpdateHistory; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public."RegistrarUpdateHistory" (
history_revision_id bigint NOT NULL,
history_date_time timestamp with time zone NOT NULL,
history_method text NOT NULL,
history_request_body text,
history_type text NOT NULL,
history_url text NOT NULL,
allowed_tlds text[],
billing_account_map public.hstore,
block_premium_names boolean NOT NULL,
client_certificate text,
client_certificate_hash text,
contacts_require_syncing boolean NOT NULL,
creation_time timestamp with time zone NOT NULL,
drive_folder_id text,
email_address text,
failover_client_certificate text,
failover_client_certificate_hash text,
fax_number text,
iana_identifier bigint,
icann_referral_email text,
i18n_address_city text,
i18n_address_country_code text,
i18n_address_state text,
i18n_address_street_line1 text,
i18n_address_street_line2 text,
i18n_address_street_line3 text,
i18n_address_zip text,
ip_address_allow_list text[],
last_certificate_update_time timestamp with time zone,
last_expiring_cert_notification_sent_date timestamp with time zone,
last_expiring_failover_cert_notification_sent_date timestamp with time zone,
localized_address_city text,
localized_address_country_code text,
localized_address_state text,
localized_address_street_line1 text,
localized_address_street_line2 text,
localized_address_street_line3 text,
localized_address_zip text,
password_hash text,
phone_number text,
phone_passcode text,
po_number text,
rdap_base_urls text[],
registrar_name text NOT NULL,
registry_lock_allowed boolean NOT NULL,
password_salt text,
state text,
type text NOT NULL,
url text,
whois_server text,
update_timestamp timestamp with time zone,
registrar_id text NOT NULL,
history_acting_user text NOT NULL
);
-- --
-- Name: RegistryLock; Type: TABLE; Schema: public; Owner: - -- Name: RegistryLock; Type: TABLE; Schema: public; Owner: -
-- --
@ -1211,6 +1319,29 @@ CREATE TABLE public."User" (
); );
--
-- Name: UserUpdateHistory; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public."UserUpdateHistory" (
history_revision_id bigint NOT NULL,
history_date_time timestamp with time zone NOT NULL,
history_method text NOT NULL,
history_request_body text,
history_type text NOT NULL,
history_url text NOT NULL,
user_id bigint NOT NULL,
email_address text NOT NULL,
registry_lock_password_hash text,
registry_lock_password_salt text,
global_role text NOT NULL,
is_admin boolean NOT NULL,
registrar_roles public.hstore,
update_timestamp timestamp with time zone,
history_acting_user text NOT NULL
);
-- --
-- Name: User_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- Name: User_id_seq; Type: SEQUENCE; Schema: public; Owner: -
-- --
@ -1406,6 +1537,14 @@ ALTER TABLE ONLY public."ClaimsList"
ADD CONSTRAINT "ClaimsList_pkey" PRIMARY KEY (revision_id); ADD CONSTRAINT "ClaimsList_pkey" PRIMARY KEY (revision_id);
--
-- Name: ConsoleEppActionHistory ConsoleEppActionHistory_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public."ConsoleEppActionHistory"
ADD CONSTRAINT "ConsoleEppActionHistory_pkey" PRIMARY KEY (history_revision_id);
-- --
-- Name: ContactHistory ContactHistory_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- Name: ContactHistory ContactHistory_pkey; Type: CONSTRAINT; Schema: public; Owner: -
-- --
@ -1558,6 +1697,14 @@ ALTER TABLE ONLY public."RdeRevision"
ADD CONSTRAINT "RdeRevision_pkey" PRIMARY KEY (tld, mode, date); ADD CONSTRAINT "RdeRevision_pkey" PRIMARY KEY (tld, mode, date);
--
-- Name: RegistrarPocUpdateHistory RegistrarPocUpdateHistory_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public."RegistrarPocUpdateHistory"
ADD CONSTRAINT "RegistrarPocUpdateHistory_pkey" PRIMARY KEY (history_revision_id);
-- --
-- Name: RegistrarPoc RegistrarPoc_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- Name: RegistrarPoc RegistrarPoc_pkey; Type: CONSTRAINT; Schema: public; Owner: -
-- --
@ -1566,6 +1713,14 @@ ALTER TABLE ONLY public."RegistrarPoc"
ADD CONSTRAINT "RegistrarPoc_pkey" PRIMARY KEY (registrar_id, email_address); ADD CONSTRAINT "RegistrarPoc_pkey" PRIMARY KEY (registrar_id, email_address);
--
-- Name: RegistrarUpdateHistory RegistrarUpdateHistory_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public."RegistrarUpdateHistory"
ADD CONSTRAINT "RegistrarUpdateHistory_pkey" PRIMARY KEY (history_revision_id);
-- --
-- Name: Registrar Registrar_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- Name: Registrar Registrar_pkey; Type: CONSTRAINT; Schema: public; Owner: -
-- --
@ -1646,6 +1801,14 @@ ALTER TABLE ONLY public."TmchCrl"
ADD CONSTRAINT "TmchCrl_pkey" PRIMARY KEY (id); ADD CONSTRAINT "TmchCrl_pkey" PRIMARY KEY (id);
--
-- Name: UserUpdateHistory UserUpdateHistory_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public."UserUpdateHistory"
ADD CONSTRAINT "UserUpdateHistory_pkey" PRIMARY KEY (history_revision_id);
-- --
-- Name: User User_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- Name: User User_pkey; Type: CONSTRAINT; Schema: public; Owner: -
-- --
@ -1735,6 +1898,13 @@ CREATE INDEX idx1rcgkdd777bpvj0r94sltwd5y ON public."Domain" USING btree (domain
CREATE INDEX idx2exdfbx6oiiwnhr8j6gjpqt2j ON public."BillingCancellation" USING btree (event_time); CREATE INDEX idx2exdfbx6oiiwnhr8j6gjpqt2j ON public."BillingCancellation" USING btree (event_time);
--
-- Name: idx3d1mucv7axrhud8w8jl4vsu62; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX idx3d1mucv7axrhud8w8jl4vsu62 ON public."RegistrarUpdateHistory" USING btree (registrar_id);
-- --
-- Name: idx3y3k7m2bkgahm9sixiohgyrga; Type: INDEX; Schema: public; Owner: - -- Name: idx3y3k7m2bkgahm9sixiohgyrga; Type: INDEX; Schema: public; Owner: -
-- --
@ -1777,6 +1947,13 @@ CREATE INDEX idx5u5m6clpk3nktrvtyy5umacb6 ON public."GracePeriod" USING btree (b
CREATE INDEX idx5yfbr88439pxw0v3j86c74fp8 ON public."BillingEvent" USING btree (event_time); CREATE INDEX idx5yfbr88439pxw0v3j86c74fp8 ON public."BillingEvent" USING btree (event_time);
--
-- Name: idx5yqacw829y5bm6f7eajsq1cts; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX idx5yqacw829y5bm6f7eajsq1cts ON public."UserUpdateHistory" USING btree (email_address);
-- --
-- Name: idx67qwkjtlq5q8dv6egtrtnhqi7; Type: INDEX; Schema: public; Owner: - -- Name: idx67qwkjtlq5q8dv6egtrtnhqi7; Type: INDEX; Schema: public; Owner: -
-- --
@ -1812,6 +1989,13 @@ CREATE INDEX idx6syykou4nkc7hqa5p8r92cpch ON public."BillingRecurrence" USING bt
CREATE INDEX idx6w3qbtgce93cal2orjg1tw7b7 ON public."DomainHistory" USING btree (history_modification_time); CREATE INDEX idx6w3qbtgce93cal2orjg1tw7b7 ON public."DomainHistory" USING btree (history_modification_time);
--
-- Name: idx6y67d6wsffmr6jcxax5ghwqhd; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX idx6y67d6wsffmr6jcxax5ghwqhd ON public."ConsoleEppActionHistory" USING btree (repo_id);
-- --
-- Name: idx73l103vc5900ig3p4odf0cngt; Type: INDEX; Schema: public; Owner: - -- Name: idx73l103vc5900ig3p4odf0cngt; Type: INDEX; Schema: public; Owner: -
-- --
@ -1896,6 +2080,13 @@ CREATE INDEX idxbgfmveqa7e5hn689koikwn70r ON public."BillingEvent" USING btree (
CREATE INDEX idxbgssjudpm428mrv0xfpvgifps ON public."GracePeriod" USING btree (billing_event_id); CREATE INDEX idxbgssjudpm428mrv0xfpvgifps ON public."GracePeriod" USING btree (billing_event_id);
--
-- Name: idxbjacjlm8ianc4kxxvamnu94k5; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX idxbjacjlm8ianc4kxxvamnu94k5 ON public."UserUpdateHistory" USING btree (history_acting_user);
-- --
-- Name: idxbn8t4wp85fgxjl8q4ctlscx55; Type: INDEX; Schema: public; Owner: - -- Name: idxbn8t4wp85fgxjl8q4ctlscx55; Type: INDEX; Schema: public; Owner: -
-- --
@ -1903,6 +2094,13 @@ CREATE INDEX idxbgssjudpm428mrv0xfpvgifps ON public."GracePeriod" USING btree (b
CREATE INDEX idxbn8t4wp85fgxjl8q4ctlscx55 ON public."Contact" USING btree (current_sponsor_registrar_id); CREATE INDEX idxbn8t4wp85fgxjl8q4ctlscx55 ON public."Contact" USING btree (current_sponsor_registrar_id);
--
-- Name: idxcclyb3n5gbex8u8m9fjlujitw; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX idxcclyb3n5gbex8u8m9fjlujitw ON public."ConsoleEppActionHistory" USING btree (history_acting_user);
-- --
-- Name: idxcju58vqascbpve1t7fem53ctl; Type: INDEX; Schema: public; Owner: - -- Name: idxcju58vqascbpve1t7fem53ctl; Type: INDEX; Schema: public; Owner: -
-- --
@ -1945,6 +2143,13 @@ CREATE INDEX idxfdk2xpil2x1gh0omt84k2y3o1 ON public."DnsRefreshRequest" USING bt
CREATE INDEX idxfg2nnjlujxo6cb9fha971bq2n ON public."HostHistory" USING btree (creation_time); CREATE INDEX idxfg2nnjlujxo6cb9fha971bq2n ON public."HostHistory" USING btree (creation_time);
--
-- Name: idxfr24wvpg8qalwqy4pni7evrpj; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX idxfr24wvpg8qalwqy4pni7evrpj ON public."RegistrarPocUpdateHistory" USING btree (registrar_id);
-- --
-- Name: idxhlqqd5uy98cjyos72d81x9j95; Type: INDEX; Schema: public; Owner: - -- Name: idxhlqqd5uy98cjyos72d81x9j95; Type: INDEX; Schema: public; Owner: -
-- --
@ -1966,6 +2171,13 @@ CREATE INDEX idxhmv411mdqo5ibn4vy7ykxpmlv ON public."BillingEvent" USING btree (
CREATE INDEX idxhp33wybmb6tbpr1bq7ttwk8je ON public."ContactHistory" USING btree (history_registrar_id); CREATE INDEX idxhp33wybmb6tbpr1bq7ttwk8je ON public."ContactHistory" USING btree (history_registrar_id);
--
-- Name: idxiahqo1d1fqdfknywmj2xbxl7t; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX idxiahqo1d1fqdfknywmj2xbxl7t ON public."ConsoleEppActionHistory" USING btree (revision_id);
-- --
-- Name: idxj1mtx98ndgbtb1bkekahms18w; Type: INDEX; Schema: public; Owner: - -- Name: idxj1mtx98ndgbtb1bkekahms18w; Type: INDEX; Schema: public; Owner: -
-- --
@ -2057,6 +2269,13 @@ CREATE INDEX idxlg6a5tp70nch9cp0gc11brc5o ON public."PackagePromotion" USING btr
CREATE INDEX idxlrq7v63pc21uoh3auq6eybyhl ON public."Domain" USING btree (autorenew_end_time); CREATE INDEX idxlrq7v63pc21uoh3auq6eybyhl ON public."Domain" USING btree (autorenew_end_time);
--
-- Name: idxm6k18dusy2lfi5y81k8g256sa; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX idxm6k18dusy2lfi5y81k8g256sa ON public."RegistrarUpdateHistory" USING btree (history_acting_user);
-- --
-- Name: idxn1f711wicdnooa2mqb7g1m55o; Type: INDEX; Schema: public; Owner: - -- Name: idxn1f711wicdnooa2mqb7g1m55o; Type: INDEX; Schema: public; Owner: -
-- --
@ -2148,6 +2367,13 @@ CREATE INDEX idxq9gy8x2xynt9tb16yajn1gcm8 ON public."Domain" USING btree (billin
CREATE INDEX idxqa3g92jc17e8dtiaviy4fet4x ON public."BillingCancellation" USING btree (billing_time); CREATE INDEX idxqa3g92jc17e8dtiaviy4fet4x ON public."BillingCancellation" USING btree (billing_time);
--
-- Name: idxr1cxua6it0rxgt9tpyugspxk; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX idxr1cxua6it0rxgt9tpyugspxk ON public."RegistrarPocUpdateHistory" USING btree (email_address);
-- --
-- Name: idxr22ciyccwi9rrqmt1ro0s59qf; Type: INDEX; Schema: public; Owner: - -- Name: idxr22ciyccwi9rrqmt1ro0s59qf; Type: INDEX; Schema: public; Owner: -
-- --
@ -2169,6 +2395,13 @@ CREATE INDEX idxrc77s1ndiemi2vwwudchye214 ON public."Host" USING gin (inet_addre
CREATE INDEX idxrh4xmrot9bd63o382ow9ltfig ON public."DomainHistory" USING btree (creation_time); CREATE INDEX idxrh4xmrot9bd63o382ow9ltfig ON public."DomainHistory" USING btree (creation_time);
--
-- Name: idxrn6posxkx58de1cp09g5257cw; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX idxrn6posxkx58de1cp09g5257cw ON public."RegistrarPocUpdateHistory" USING btree (history_acting_user);
-- --
-- Name: idxrwl38wwkli1j7gkvtywi9jokq; Type: INDEX; Schema: public; Owner: - -- Name: idxrwl38wwkli1j7gkvtywi9jokq; Type: INDEX; Schema: public; Owner: -
-- --
@ -2274,6 +2507,14 @@ CREATE INDEX spec11threatmatch_tld_idx ON public."Spec11ThreatMatch" USING btree
CREATE INDEX user_email_address_idx ON public."User" USING btree (email_address); CREATE INDEX user_email_address_idx ON public."User" USING btree (email_address);
--
-- Name: UserUpdateHistory fk1s7bopbl3pwrhv3jkkofnv3o0; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public."UserUpdateHistory"
ADD CONSTRAINT fk1s7bopbl3pwrhv3jkkofnv3o0 FOREIGN KEY (history_acting_user) REFERENCES public."User"(email_address);
-- --
-- Name: Contact fk1sfyj7o7954prbn1exk7lpnoe; Type: FK CONSTRAINT; Schema: public; Owner: - -- Name: Contact fk1sfyj7o7954prbn1exk7lpnoe; Type: FK CONSTRAINT; Schema: public; Owner: -
-- --
@ -2762,6 +3003,14 @@ ALTER TABLE ONLY public."DomainHistoryHost"
ADD CONSTRAINT fka9woh3hu8gx5x0vly6bai327n FOREIGN KEY (domain_history_domain_repo_id, domain_history_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED; ADD CONSTRAINT fka9woh3hu8gx5x0vly6bai327n FOREIGN KEY (domain_history_domain_repo_id, domain_history_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED;
--
-- Name: ConsoleEppActionHistory fkb686b9os2nsjpv930npa4r3b4; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public."ConsoleEppActionHistory"
ADD CONSTRAINT fkb686b9os2nsjpv930npa4r3b4 FOREIGN KEY (history_acting_user) REFERENCES public."User"(email_address);
-- --
-- Name: BsaUnblockableDomain fkbsaunblockabledomainlabel; Type: FK CONSTRAINT; Schema: public; Owner: - -- Name: BsaUnblockableDomain fkbsaunblockabledomainlabel; Type: FK CONSTRAINT; Schema: public; Owner: -
-- --
@ -2786,6 +3035,14 @@ ALTER TABLE ONLY public."DomainHost"
ADD CONSTRAINT fkfmi7bdink53swivs390m2btxg FOREIGN KEY (domain_repo_id) REFERENCES public."Domain"(repo_id) DEFERRABLE INITIALLY DEFERRED; ADD CONSTRAINT fkfmi7bdink53swivs390m2btxg FOREIGN KEY (domain_repo_id) REFERENCES public."Domain"(repo_id) DEFERRABLE INITIALLY DEFERRED;
--
-- Name: RegistrarPocUpdateHistory fkftpbwctxtkc1i0njc0tdcaa2g; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public."RegistrarPocUpdateHistory"
ADD CONSTRAINT fkftpbwctxtkc1i0njc0tdcaa2g FOREIGN KEY (history_acting_user) REFERENCES public."User"(email_address);
-- --
-- Name: ReservedEntry fkgq03rk0bt1hb915dnyvd3vnfc; Type: FK CONSTRAINT; Schema: public; Owner: - -- Name: ReservedEntry fkgq03rk0bt1hb915dnyvd3vnfc; Type: FK CONSTRAINT; Schema: public; Owner: -
-- --
@ -2826,6 +3083,30 @@ ALTER TABLE ONLY public."DomainDsDataHistory"
ADD CONSTRAINT fko4ilgyyfnvppbpuivus565i0j FOREIGN KEY (domain_repo_id, domain_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED; ADD CONSTRAINT fko4ilgyyfnvppbpuivus565i0j FOREIGN KEY (domain_repo_id, domain_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED;
--
-- Name: RegistrarPocUpdateHistory fkregistrarpocupdatehistoryemailaddress; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public."RegistrarPocUpdateHistory"
ADD CONSTRAINT fkregistrarpocupdatehistoryemailaddress FOREIGN KEY (email_address, registrar_id) REFERENCES public."RegistrarPoc"(email_address, registrar_id);
--
-- Name: RegistrarUpdateHistory fkregistrarupdatehistoryregistrarid; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public."RegistrarUpdateHistory"
ADD CONSTRAINT fkregistrarupdatehistoryregistrarid FOREIGN KEY (registrar_id) REFERENCES public."Registrar"(registrar_id);
--
-- Name: RegistrarUpdateHistory fksr7w342s7x5s5jvdti2axqeq8; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public."RegistrarUpdateHistory"
ADD CONSTRAINT fksr7w342s7x5s5jvdti2axqeq8 FOREIGN KEY (history_acting_user) REFERENCES public."User"(email_address);
-- --
-- Name: DelegationSignerData fktr24j9v14ph2mfuw2gsmt12kq; Type: FK CONSTRAINT; Schema: public; Owner: - -- Name: DelegationSignerData fktr24j9v14ph2mfuw2gsmt12kq; Type: FK CONSTRAINT; Schema: public; Owner: -
-- --
@ -2834,6 +3115,14 @@ ALTER TABLE ONLY public."DelegationSignerData"
ADD CONSTRAINT fktr24j9v14ph2mfuw2gsmt12kq FOREIGN KEY (domain_repo_id) REFERENCES public."Domain"(repo_id) DEFERRABLE INITIALLY DEFERRED; ADD CONSTRAINT fktr24j9v14ph2mfuw2gsmt12kq FOREIGN KEY (domain_repo_id) REFERENCES public."Domain"(repo_id) DEFERRABLE INITIALLY DEFERRED;
--
-- Name: UserUpdateHistory fkuserupdatehistoryemailaddress; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public."UserUpdateHistory"
ADD CONSTRAINT fkuserupdatehistoryemailaddress FOREIGN KEY (email_address) REFERENCES public."User"(email_address);
-- --
-- PostgreSQL database dump complete -- PostgreSQL database dump complete
-- --