+
@@ -4476,23 +4268,6 @@ Tables
|
-
- fk_billing_cancellation_domain_history |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id (0..many)→ public."DomainHistory".domain_repo_id |
- |
-
-
- |
- domain_history_revision_id (0..many)→ public."DomainHistory".history_revision_id |
- |
-
-
- |
-
Indexes |
@@ -4580,6 +4355,23 @@ Tables
event_time |
ascending |
+
+ |
+
+
+ idx7v75e535c47mxfb2rk9o843bn |
+ [non-unique index] |
+
+
+ |
+ domain_repo_id |
+ ascending |
+
+
+ |
+ domain_history_revision_id |
+ ascending |
+
@@ -4767,40 +4559,6 @@ Tables
|
-
- fk_billing_event_domain_history |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id (0..many)→ public."DomainHistory".domain_repo_id |
- |
-
-
- |
- domain_history_revision_id (0..many)→ public."DomainHistory".history_revision_id |
- |
-
-
- |
-
-
- fk_billing_event_recurrence_history |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id (0..many)→ public."DomainHistory".domain_repo_id |
- |
-
-
- |
- recurrence_history_revision_id (0..many)→ public."DomainHistory".history_revision_id |
- |
-
-
- |
-
Indexes |
@@ -4900,6 +4658,40 @@ Tables
synthetic_creation_time |
ascending |
+
+ |
+
+
+ idx77ceolnf7rok8ui957msmo6en |
+ [non-unique index] |
+
+
+ |
+ domain_repo_id |
+ ascending |
+
+
+ |
+ domain_history_revision_id |
+ ascending |
+
+
+ |
+
+
+ idxehp8ejwpbsooar0e8k32847m3 |
+ [non-unique index] |
+
+
+ |
+ domain_repo_id |
+ ascending |
+
+
+ |
+ recurrence_history_revision_id |
+ ascending |
+
@@ -5077,23 +4869,6 @@ Tables
|
-
- fk_billing_recurrence_domain_history |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id (0..many)→ public."DomainHistory".domain_repo_id |
- |
-
-
- |
- domain_history_revision_id (0..many)→ public."DomainHistory".history_revision_id |
- |
-
-
- |
-
Indexes |
@@ -5181,6 +4956,23 @@ Tables
recurrence_last_expansion |
ascending |
+
+ |
+
+
+ idxlh9lvmxb2dj3ti83buauwvbil |
+ [non-unique index] |
+
+
+ |
+ domain_repo_id |
+ ascending |
+
+
+ |
+ domain_history_revision_id |
+ ascending |
+
@@ -7976,48 +7768,42 @@ Tables
|
- Foreign Keys |
+ Indexes |
|
- fko4ilgyyfnvppbpuivus565i0j |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id (0..many)→ public."DomainHistory".domain_repo_id |
- |
+ "DomainDsDataHistory_pkey" |
+ [unique index] |
|
- domain_history_revision_id (0..many)→ public."DomainHistory".history_revision_id |
- |
+ ds_data_history_revision_id |
+ ascending |
|
- Indexes |
-
-
- |
+ domain_history_to_ds_data_history_idx |
+ [non-unique index] |
- "DomainDsDataHistory_pkey" |
- [unique index] |
+ |
+ domain_repo_id |
+ ascending |
|
- ds_data_history_revision_id |
+ domain_history_revision_id |
ascending |
|
- domain_history_to_ds_data_history_idx |
+ idxmk1d2ngdtfkg6odmw7l5ejisw |
[non-unique index] |
@@ -8441,91 +8227,6 @@ Tables
|
-
- fk_billing_cancellation_domain_history |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id ←(0..many) public."BillingCancellation".domain_repo_id |
- |
-
-
- |
- history_revision_id ←(0..many) public."BillingCancellation".domain_history_revision_id |
- |
-
-
- |
-
-
- fk_billing_event_domain_history |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id ←(0..many) public."BillingEvent".domain_repo_id |
- |
-
-
- |
- history_revision_id ←(0..many) public."BillingEvent".domain_history_revision_id |
- |
-
-
- |
-
-
- fk_billing_event_recurrence_history |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id ←(0..many) public."BillingEvent".domain_repo_id |
- |
-
-
- |
- history_revision_id ←(0..many) public."BillingEvent".recurrence_history_revision_id |
- |
-
-
- |
-
-
- fk_billing_recurrence_domain_history |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id ←(0..many) public."BillingRecurrence".domain_repo_id |
- |
-
-
- |
- history_revision_id ←(0..many) public."BillingRecurrence".domain_history_revision_id |
- |
-
-
- |
-
-
- fko4ilgyyfnvppbpuivus565i0j |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id ←(0..many) public."DomainDsDataHistory".domain_repo_id |
- |
-
-
- |
- history_revision_id ←(0..many) public."DomainDsDataHistory".domain_history_revision_id |
- |
-
-
- |
-
fka9woh3hu8gx5x0vly6bai327n |
[foreign key, with no action] |
@@ -8543,57 +8244,6 @@ Tables
|
-
- fkcjqe54u72kha71vkibvxhjye7 |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id ←(0..many) public."DomainTransactionRecord".domain_repo_id |
- |
-
-
- |
- history_revision_id ←(0..many) public."DomainTransactionRecord".history_revision_id |
- |
-
-
- |
-
-
- fk7w3cx8d55q8bln80e716tr7b8 |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id ←(0..many) public."GracePeriodHistory".domain_repo_id |
- |
-
-
- |
- history_revision_id ←(0..many) public."GracePeriodHistory".domain_history_revision_id |
- |
-
-
- |
-
-
- fk_poll_message_domain_history |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id ←(0..many) public."PollMessage".domain_repo_id |
- |
-
-
- |
- history_revision_id ←(0..many) public."PollMessage".domain_history_revision_id |
- |
-
-
- |
-
Indexes |
@@ -8919,42 +8569,42 @@ Tables
|
- fkcjqe54u72kha71vkibvxhjye7 |
- [foreign key, with no action] |
+ Indexes |
- |
- domain_repo_id (0..many)→ public."DomainHistory".domain_repo_id |
- |
+ |
- |
- history_revision_id (0..many)→ public."DomainHistory".history_revision_id |
- |
+ "DomainTransactionRecord_pkey" |
+ [unique index] |
- |
+ |
+ id |
+ ascending |
- Indexes |
+ |
- |
+ domain_history_to_transaction_record_idx |
+ [non-unique index] |
- "DomainTransactionRecord_pkey" |
- [unique index] |
+ |
+ domain_repo_id |
+ ascending |
|
- id |
+ history_revision_id |
ascending |
|
- domain_history_to_transaction_record_idx |
+ idx1dyqmqb61xbnj7mt7bk27ds25 |
[non-unique index] |
@@ -9265,48 +8915,37 @@ Tables
|
- Foreign Keys |
+ Indexes |
|
- fk7w3cx8d55q8bln80e716tr7b8 |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id (0..many)→ public."DomainHistory".domain_repo_id |
- |
+ "GracePeriodHistory_pkey" |
+ [unique index] |
|
- domain_history_revision_id (0..many)→ public."DomainHistory".history_revision_id |
- |
-
-
- |
-
-
- Indexes |
+ grace_period_history_revision_id |
+ ascending |
|
- "GracePeriodHistory_pkey" |
- [unique index] |
+ idxd01j17vrpjxaerxdmn8bwxs7s |
+ [non-unique index] |
|
- grace_period_history_revision_id |
+ domain_repo_id |
ascending |
|
- idxd01j17vrpjxaerxdmn8bwxs7s |
+ idxl67y6wclc2uaupepnvkoo81fl |
[non-unique index] |
@@ -9314,6 +8953,11 @@ Tables
domain_repo_id |
ascending |
+
+ |
+ domain_history_revision_id |
+ ascending |
+
@@ -10325,23 +9969,6 @@ Tables
|
-
- fk_poll_message_domain_history |
- [foreign key, with no action] |
-
-
- |
- domain_repo_id (0..many)→ public."DomainHistory".domain_repo_id |
- |
-
-
- |
- domain_history_revision_id (0..many)→ public."DomainHistory".history_revision_id |
- |
-
-
- |
-
fk_poll_message_host_history |
[foreign key, with no action] |
@@ -10410,6 +10037,23 @@ Tables
event_time |
ascending |
+
+ |
+
+
+ idxnuyqo6hrtuvbcmuecf7vkfmle |
+ [non-unique index] |
+
+
+ |
+ domain_repo_id |
+ ascending |
+
+
+ |
+ domain_history_revision_id |
+ ascending |
+
diff --git a/db/src/main/resources/sql/flyway.txt b/db/src/main/resources/sql/flyway.txt
index b08e0a5e3f2..4b8fda46d40 100644
--- a/db/src/main/resources/sql/flyway.txt
+++ b/db/src/main/resources/sql/flyway.txt
@@ -177,3 +177,10 @@ V176__drop_login_email_address_column_from_registrar_poc.sql
V177__drop_user_id.sql
V178__drop_user_id_history.sql
V179__add_discount_price_allocation_token.sql
+V180__remove_fk_graceperiodhistory_domainhistory.sql
+V181__remove_fk_billingcancellation_domainhistory.sql
+V182__remove_fk_billingevent_domainhistory.sql
+V183__remove_fk_billingrecurrence_domainhistory.sql
+V184__remove_fk_pollmessage_domainhistory.sql
+V185__remove_fk_domaintransactionrecord_domainhistory.sql
+V186__remove_fk_domaindsdatahistory_domainhistory.sql
diff --git a/db/src/main/resources/sql/flyway/V180__remove_fk_graceperiodhistory_domainhistory.sql b/db/src/main/resources/sql/flyway/V180__remove_fk_graceperiodhistory_domainhistory.sql
new file mode 100644
index 00000000000..ab61ee8e77d
--- /dev/null
+++ b/db/src/main/resources/sql/flyway/V180__remove_fk_graceperiodhistory_domainhistory.sql
@@ -0,0 +1,16 @@
+-- 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 "GracePeriodHistory" DROP CONSTRAINT fk7w3cx8d55q8bln80e716tr7b8;
+CREATE INDEX IDXl67y6wclc2uaupepnvkoo81fl on "GracePeriodHistory" (domain_repo_id, domain_history_revision_id);
diff --git a/db/src/main/resources/sql/flyway/V181__remove_fk_billingcancellation_domainhistory.sql b/db/src/main/resources/sql/flyway/V181__remove_fk_billingcancellation_domainhistory.sql
new file mode 100644
index 00000000000..53bdf29b61c
--- /dev/null
+++ b/db/src/main/resources/sql/flyway/V181__remove_fk_billingcancellation_domainhistory.sql
@@ -0,0 +1,16 @@
+-- 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 "BillingCancellation" DROP CONSTRAINT fk_billing_cancellation_domain_history;
+CREATE INDEX IDX7v75e535c47mxfb2rk9o843bn ON"BillingCancellation" (domain_repo_id, domain_history_revision_id);
diff --git a/db/src/main/resources/sql/flyway/V182__remove_fk_billingevent_domainhistory.sql b/db/src/main/resources/sql/flyway/V182__remove_fk_billingevent_domainhistory.sql
new file mode 100644
index 00000000000..14fb791fca4
--- /dev/null
+++ b/db/src/main/resources/sql/flyway/V182__remove_fk_billingevent_domainhistory.sql
@@ -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.
+
+ALTER TABLE "BillingEvent" DROP CONSTRAINT fk_billing_event_domain_history;
+ALTER TABLE "BillingEvent" DROP CONSTRAINT fk_billing_event_recurrence_history;
+CREATE INDEX IDX77ceolnf7rok8ui957msmo6en ON "BillingEvent" (domain_repo_id, domain_history_revision_id);
+CREATE INDEX IDXehp8ejwpbsooar0e8k32847m3 ON "BillingEvent" (domain_repo_id, recurrence_history_revision_id);
diff --git a/db/src/main/resources/sql/flyway/V183__remove_fk_billingrecurrence_domainhistory.sql b/db/src/main/resources/sql/flyway/V183__remove_fk_billingrecurrence_domainhistory.sql
new file mode 100644
index 00000000000..21632e7e7d0
--- /dev/null
+++ b/db/src/main/resources/sql/flyway/V183__remove_fk_billingrecurrence_domainhistory.sql
@@ -0,0 +1,16 @@
+-- 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 "BillingRecurrence" DROP CONSTRAINT fk_billing_recurrence_domain_history;
+CREATE INDEX IDXlh9lvmxb2dj3ti83buauwvbil ON "BillingRecurrence" (domain_repo_id, domain_history_revision_id);
diff --git a/db/src/main/resources/sql/flyway/V184__remove_fk_pollmessage_domainhistory.sql b/db/src/main/resources/sql/flyway/V184__remove_fk_pollmessage_domainhistory.sql
new file mode 100644
index 00000000000..0996e1f5836
--- /dev/null
+++ b/db/src/main/resources/sql/flyway/V184__remove_fk_pollmessage_domainhistory.sql
@@ -0,0 +1,16 @@
+-- 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 "PollMessage" DROP CONSTRAINT fk_poll_message_domain_history;
+CREATE INDEX IDXnuyqo6hrtuvbcmuecf7vkfmle ON "PollMessage" (domain_repo_id, domain_history_revision_id);
diff --git a/db/src/main/resources/sql/flyway/V185__remove_fk_domaintransactionrecord_domainhistory.sql b/db/src/main/resources/sql/flyway/V185__remove_fk_domaintransactionrecord_domainhistory.sql
new file mode 100644
index 00000000000..5baa2e016fe
--- /dev/null
+++ b/db/src/main/resources/sql/flyway/V185__remove_fk_domaintransactionrecord_domainhistory.sql
@@ -0,0 +1,16 @@
+-- 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 "DomainTransactionRecord" DROP CONSTRAINT "fkcjqe54u72kha71vkibvxhjye7";
+CREATE INDEX IDX1dyqmqb61xbnj7mt7bk27ds25 ON "DomainTransactionRecord" (domain_repo_id, history_revision_id);
diff --git a/db/src/main/resources/sql/flyway/V186__remove_fk_domaindsdatahistory_domainhistory.sql b/db/src/main/resources/sql/flyway/V186__remove_fk_domaindsdatahistory_domainhistory.sql
new file mode 100644
index 00000000000..5a4cbcab2c1
--- /dev/null
+++ b/db/src/main/resources/sql/flyway/V186__remove_fk_domaindsdatahistory_domainhistory.sql
@@ -0,0 +1,16 @@
+-- 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 "DomainDsDataHistory" DROP CONSTRAINT fko4ilgyyfnvppbpuivus565i0j;
+CREATE INDEX IDXmk1d2ngdtfkg6odmw7l5ejisw ON "DomainDsDataHistory" (domain_repo_id, domain_history_revision_id);
diff --git a/db/src/main/resources/sql/schema/db-schema.sql.generated b/db/src/main/resources/sql/schema/db-schema.sql.generated
index d97b158fab2..f887e8b325a 100644
--- a/db/src/main/resources/sql/schema/db-schema.sql.generated
+++ b/db/src/main/resources/sql/schema/db-schema.sql.generated
@@ -941,12 +941,15 @@
create index IDXqa3g92jc17e8dtiaviy4fet4x
on "BillingCancellation" (billing_time);
- create index IDX4ytbe5f3b39trsd4okx5ijhs4
+ create index IDX4muirjyj3kt8nx63nrjxigktk
on "BillingCancellation" (billing_event_id);
- create index IDXku0fopwyvd57ebo8bf0jg9xo2
+ create index IDXmfu2k59a54e0ttoxchwaci7qy
on "BillingCancellation" (billing_recurrence_id);
+ create index IDX7v75e535c47mxfb2rk9o843bn
+ on "BillingCancellation" (domain_repo_id, domain_history_revision_id);
+
create index IDXqspv57gj2led8ly42fq01t7m7
on "BillingEvent" (registrar_id);
@@ -965,9 +968,15 @@
create index IDXcesda59ssop44kklytpb292hn
on "BillingEvent" (allocation_token);
- create index IDX6ebt3nwk5ocvnremnhnlkl6ff
+ create index IDX80375qd9haxrvwk8ovqmp3695
on "BillingEvent" (cancellation_matching_billing_recurrence_id);
+ create index IDX77ceolnf7rok8ui957msmo6en
+ on "BillingEvent" (domain_repo_id, domain_history_revision_id);
+
+ create index IDXehp8ejwpbsooar0e8k32847m3
+ on "BillingEvent" (domain_repo_id, recurrence_history_revision_id);
+
create index IDXd3gxhkh0jk694pjvh9pyn7wjc
on "BillingRecurrence" (registrar_id);
@@ -983,9 +992,12 @@
create index IDXp0pxi708hlu4n40qhbtihge8x
on "BillingRecurrence" (recurrence_last_expansion);
- create index IDXjny8wuot75b5e6p38r47wdawu
+ create index IDXbix949l2kfn9r03l6omyhi36f
on "BillingRecurrence" (recurrence_time_of_year);
+ create index IDXlh9lvmxb2dj3ti83buauwvbil
+ on "BillingRecurrence" (domain_repo_id, domain_history_revision_id);
+
create index IDXj874kw19bgdnkxo1rue45jwlw
on "BsaDownload" (creation_time);
@@ -1079,6 +1091,9 @@
create index IDXhteajcrxmq4o8rsys8kevyiqr
on "Domain" (transfer_billing_cancellation_id);
+ create index IDXmk1d2ngdtfkg6odmw7l5ejisw
+ on "DomainDsDataHistory" (domain_repo_id, domain_history_revision_id);
+
create index IDXrh4xmrot9bd63o382ow9ltfig
on "DomainHistory" (creation_time);
@@ -1097,6 +1112,9 @@
create index IDXjw3rwtfrexyq53x9vu7qghrdt
on "DomainHost" (host_repo_id);
+ create index IDX1dyqmqb61xbnj7mt7bk27ds25
+ on "DomainTransactionRecord" (domain_repo_id, history_revision_id);
+
create index IDXj1mtx98ndgbtb1bkekahms18w
on "GracePeriod" (domain_repo_id);
@@ -1109,6 +1127,9 @@
create index IDXd01j17vrpjxaerxdmn8bwxs7s
on "GracePeriodHistory" (domain_repo_id);
+ create index IDXl67y6wclc2uaupepnvkoo81fl
+ on "GracePeriodHistory" (domain_repo_id, domain_history_revision_id);
+
create index IDXkpkh68n6dy5v51047yr6b0e9l
on "Host" (host_name);
@@ -1145,12 +1166,15 @@
create index IDXf2q9dqj899h1q8lah5y719nxd
on "PollMessage" (domain_repo_id);
- create index IDXe7wu46c7wpvfmfnj4565abibp
+ create index IDXb75725p8js6987ubi8a7nhdqs
on "PollMessage" (registrar_id);
create index IDXaydgox62uno9qx8cjlj5lauye
on "PollMessage" (event_time);
+ create index IDXnuyqo6hrtuvbcmuecf7vkfmle
+ on "PollMessage" (domain_repo_id, domain_history_revision_id);
+
create index premiumlist_name_idx
on "PremiumList" (name);
diff --git a/db/src/main/resources/sql/schema/nomulus.golden.sql b/db/src/main/resources/sql/schema/nomulus.golden.sql
index 82dc98d51f3..f5e07aa12c8 100644
--- a/db/src/main/resources/sql/schema/nomulus.golden.sql
+++ b/db/src/main/resources/sql/schema/nomulus.golden.sql
@@ -1862,6 +1862,13 @@ CREATE INDEX domain_history_to_ds_data_history_idx ON public."DomainDsDataHistor
CREATE INDEX domain_history_to_transaction_record_idx ON public."DomainTransactionRecord" USING btree (domain_repo_id, history_revision_id);
+--
+-- Name: idx1dyqmqb61xbnj7mt7bk27ds25; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX idx1dyqmqb61xbnj7mt7bk27ds25 ON public."DomainTransactionRecord" USING btree (domain_repo_id, history_revision_id);
+
+
--
-- Name: idx1iy7njgb7wjmj9piml4l2g0qi; Type: INDEX; Schema: public; Owner: -
--
@@ -2002,6 +2009,20 @@ CREATE INDEX idx6y67d6wsffmr6jcxax5ghwqhd ON public."ConsoleEppActionHistory" US
CREATE INDEX idx73l103vc5900ig3p4odf0cngt ON public."BillingEvent" USING btree (registrar_id);
+--
+-- Name: idx77ceolnf7rok8ui957msmo6en; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX idx77ceolnf7rok8ui957msmo6en ON public."BillingEvent" USING btree (domain_repo_id, domain_history_revision_id);
+
+
+--
+-- Name: idx7v75e535c47mxfb2rk9o843bn; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX idx7v75e535c47mxfb2rk9o843bn ON public."BillingCancellation" USING btree (domain_repo_id, domain_history_revision_id);
+
+
--
-- Name: idx8gtvnbk64yskcvrdp61f5ied3; Type: INDEX; Schema: public; Owner: -
--
@@ -2121,6 +2142,13 @@ CREATE INDEX idxd01j17vrpjxaerxdmn8bwxs7s ON public."GracePeriodHistory" USING b
CREATE INDEX idxe7wu46c7wpvfmfnj4565abibp ON public."PollMessage" USING btree (registrar_id);
+--
+-- Name: idxehp8ejwpbsooar0e8k32847m3; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX idxehp8ejwpbsooar0e8k32847m3 ON public."BillingEvent" USING btree (domain_repo_id, recurrence_history_revision_id);
+
+
--
-- Name: idxeokttmxtpq2hohcioe5t2242b; Type: INDEX; Schema: public; Owner: -
--
@@ -2261,6 +2289,13 @@ CREATE INDEX idxku0fopwyvd57ebo8bf0jg9xo2 ON public."BillingCancellation" USING
CREATE INDEX idxl49vydnq0h5j1piefwjy4i8er ON public."Host" USING btree (current_sponsor_registrar_id);
+--
+-- Name: idxl67y6wclc2uaupepnvkoo81fl; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX idxl67y6wclc2uaupepnvkoo81fl ON public."GracePeriodHistory" USING btree (domain_repo_id, domain_history_revision_id);
+
+
--
-- Name: idxl8vobbecsd32k4ksavdfx8st6; Type: INDEX; Schema: public; Owner: -
--
@@ -2275,6 +2310,13 @@ CREATE INDEX idxl8vobbecsd32k4ksavdfx8st6 ON public."BillingCancellation" USING
CREATE INDEX idxlg6a5tp70nch9cp0gc11brc5o ON public."PackagePromotion" USING btree (token);
+--
+-- Name: idxlh9lvmxb2dj3ti83buauwvbil; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX idxlh9lvmxb2dj3ti83buauwvbil ON public."BillingRecurrence" USING btree (domain_repo_id, domain_history_revision_id);
+
+
--
-- Name: idxlrq7v63pc21uoh3auq6eybyhl; Type: INDEX; Schema: public; Owner: -
--
@@ -2289,6 +2331,13 @@ CREATE INDEX idxlrq7v63pc21uoh3auq6eybyhl ON public."Domain" USING btree (autore
CREATE INDEX idxm6k18dusy2lfi5y81k8g256sa ON public."RegistrarUpdateHistory" USING btree (history_acting_user);
+--
+-- Name: idxmk1d2ngdtfkg6odmw7l5ejisw; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX idxmk1d2ngdtfkg6odmw7l5ejisw ON public."DomainDsDataHistory" USING btree (domain_repo_id, domain_history_revision_id);
+
+
--
-- Name: idxn1f711wicdnooa2mqb7g1m55o; Type: INDEX; Schema: public; Owner: -
--
@@ -2317,6 +2366,13 @@ CREATE INDEX idxnb02m43jcx24r64n8rbg22u4q ON public."Domain" USING btree (admin_
CREATE INDEX idxnjhib7v6fj7dhj5qydkefkl2u ON public."Domain" USING btree (lordn_phase) WHERE (lordn_phase <> 'NONE'::text);
+--
+-- Name: idxnuyqo6hrtuvbcmuecf7vkfmle; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX idxnuyqo6hrtuvbcmuecf7vkfmle ON public."PollMessage" USING btree (domain_repo_id, domain_history_revision_id);
+
+
--
-- Name: idxo1xdtpij2yryh0skxe9v91sep; Type: INDEX; Schema: public; Owner: -
--
@@ -2569,14 +2625,6 @@ ALTER TABLE ONLY public."ClaimsEntry"
ADD CONSTRAINT fk6sc6at5hedffc0nhdcab6ivuq FOREIGN KEY (revision_id) REFERENCES public."ClaimsList"(revision_id) DEFERRABLE INITIALLY DEFERRED;
---
--- Name: GracePeriodHistory fk7w3cx8d55q8bln80e716tr7b8; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public."GracePeriodHistory"
- ADD CONSTRAINT fk7w3cx8d55q8bln80e716tr7b8 FOREIGN KEY (domain_repo_id, domain_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED;
-
-
--
-- Name: Contact fk93c185fx7chn68uv7nl6uv2s0; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@@ -2601,14 +2649,6 @@ ALTER TABLE ONLY public."BillingCancellation"
ADD CONSTRAINT fk_billing_cancellation_billing_recurrence_id FOREIGN KEY (billing_recurrence_id) REFERENCES public."BillingRecurrence"(billing_recurrence_id) DEFERRABLE INITIALLY DEFERRED;
---
--- Name: BillingCancellation fk_billing_cancellation_domain_history; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public."BillingCancellation"
- ADD CONSTRAINT fk_billing_cancellation_domain_history FOREIGN KEY (domain_repo_id, domain_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED;
-
-
--
-- Name: BillingCancellation fk_billing_cancellation_registrar_id; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@@ -2633,22 +2673,6 @@ ALTER TABLE ONLY public."BillingEvent"
ADD CONSTRAINT fk_billing_event_cancellation_matching_billing_recurrence_id FOREIGN KEY (cancellation_matching_billing_recurrence_id) REFERENCES public."BillingRecurrence"(billing_recurrence_id) DEFERRABLE INITIALLY DEFERRED;
---
--- Name: BillingEvent fk_billing_event_domain_history; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public."BillingEvent"
- ADD CONSTRAINT fk_billing_event_domain_history FOREIGN KEY (domain_repo_id, domain_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED;
-
-
---
--- Name: BillingEvent fk_billing_event_recurrence_history; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public."BillingEvent"
- ADD CONSTRAINT fk_billing_event_recurrence_history FOREIGN KEY (domain_repo_id, recurrence_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED;
-
-
--
-- Name: BillingEvent fk_billing_event_registrar_id; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@@ -2657,14 +2681,6 @@ ALTER TABLE ONLY public."BillingEvent"
ADD CONSTRAINT fk_billing_event_registrar_id FOREIGN KEY (registrar_id) REFERENCES public."Registrar"(registrar_id) DEFERRABLE INITIALLY DEFERRED;
---
--- Name: BillingRecurrence fk_billing_recurrence_domain_history; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public."BillingRecurrence"
- ADD CONSTRAINT fk_billing_recurrence_domain_history FOREIGN KEY (domain_repo_id, domain_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED;
-
-
--
-- Name: BillingRecurrence fk_billing_recurrence_registrar_id; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@@ -2937,14 +2953,6 @@ ALTER TABLE ONLY public."PollMessage"
ADD CONSTRAINT fk_poll_message_contact_repo_id FOREIGN KEY (contact_repo_id) REFERENCES public."Contact"(repo_id) DEFERRABLE INITIALLY DEFERRED;
---
--- Name: PollMessage fk_poll_message_domain_history; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public."PollMessage"
- ADD CONSTRAINT fk_poll_message_domain_history FOREIGN KEY (domain_repo_id, domain_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED;
-
-
--
-- Name: PollMessage fk_poll_message_domain_repo_id; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@@ -3025,14 +3033,6 @@ ALTER TABLE ONLY public."BsaUnblockableDomain"
ADD CONSTRAINT fkbsaunblockabledomainlabel FOREIGN KEY (label) REFERENCES public."BsaLabel"(label) ON DELETE CASCADE;
---
--- Name: DomainTransactionRecord fkcjqe54u72kha71vkibvxhjye7; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public."DomainTransactionRecord"
- ADD CONSTRAINT fkcjqe54u72kha71vkibvxhjye7 FOREIGN KEY (domain_repo_id, history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED;
-
-
--
-- Name: DomainHost fkfmi7bdink53swivs390m2btxg; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@@ -3081,14 +3081,6 @@ ALTER TABLE ONLY public."PremiumEntry"
ADD CONSTRAINT fko0gw90lpo1tuee56l0nb6y6g5 FOREIGN KEY (revision_id) REFERENCES public."PremiumList"(revision_id) DEFERRABLE INITIALLY DEFERRED;
---
--- Name: DomainDsDataHistory fko4ilgyyfnvppbpuivus565i0j; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-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;
-
-
--
-- Name: RegistrarPocUpdateHistory fkregistrarpocupdatehistoryemailaddress; Type: FK CONSTRAINT; Schema: public; Owner: -
--