diff --git a/core/src/main/java/google/registry/model/host/HostResource.java b/core/src/main/java/google/registry/model/host/HostResource.java
index a1c876490..a6dbee862 100644
--- a/core/src/main/java/google/registry/model/host/HostResource.java
+++ b/core/src/main/java/google/registry/model/host/HostResource.java
@@ -47,7 +47,12 @@ import javax.persistence.AccessType;
* would prevent us from using JPA standard bootstrapping). For now, there is no obvious benefit
* doing either.
*/
- indexes = {@javax.persistence.Index(columnList = "hostName")})
+ indexes = {
+ @javax.persistence.Index(columnList = "hostName"),
+ @javax.persistence.Index(columnList = "creationTime"),
+ @javax.persistence.Index(columnList = "deletionTime"),
+ @javax.persistence.Index(columnList = "currentSponsorRegistrarId")
+ })
@ExternalMessagingName("host")
@WithStringVKey
@Access(AccessType.FIELD) // otherwise it'll use the default if the repoId (property)
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 c326612b6..32832528c 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 |
- 2022-03-14 17:59:45.688046 |
+ 2022-03-15 20:34:15.683737 |
last flyway file |
- V112__add_billingrecurrence_missing_indexes.sql |
+ V113__add_host_missing_indexes.sql |
@@ -284,7 +284,7 @@ td.section {
generated on
- 2022-03-14 17:59:45.688046
+ 2022-03-15 20:34:15.683737
@@ -503,246 +503,246 @@ td.section {
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
-
+
billingevent_a57d1815:w->domainhistory_a54cc226:e
-
+
-
-
-
-
+
+
+
+
fk_billing_event_domain_history
billingevent_a57d1815:w->domainhistory_a54cc226:e
-
+
-
-
-
-
+
+
+
+
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
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
billingcancellation_6eedf614
-
-
+
+
public.BillingCancellation
-
-
+
+
[table]
-
+
billing_cancellation_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
-
+
billing_time
-
+
-
+
timestamptz
-
+
billing_event_id
-
+
-
+
int8
-
+
billing_recurrence_id
-
+
-
+
int8
-
+
billingcancellation_6eedf614:w->billingevent_a57d1815:e
-
-
-
+
+
+
@@ -753,233 +753,233 @@ td.section {
billingcancellation_6eedf614:w->billingrecurrence_5fa2cb01:e
-
-
-
+
+
+
-
+
fk_billing_cancellation_billing_recurrence_id
billingcancellation_6eedf614:w->domainhistory_a54cc226:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_billing_cancellation_domain_history
billingcancellation_6eedf614:w->domainhistory_a54cc226:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_billing_cancellation_domain_history
billingcancellation_6eedf614:w->registrar_6e1503e3:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_billing_cancellation_registrar_id
domain_6c51cffa
-
-
+
+
public.Domain
-
-
+
+
[table]
-
+
repo_id
-
+
-
+
text not null
-
+
creation_registrar_id
-
+
-
+
text not null
-
+
creation_time
-
+
-
+
timestamptz not null
-
+
current_sponsor_registrar_id
-
+
-
+
text not null
-
+
deletion_time
-
+
-
+
timestamptz
-
+
last_epp_update_registrar_id
-
+
-
+
text
-
+
domain_name
-
+
-
+
text
-
+
tld
-
+
-
+
text
-
+
admin_contact
-
+
-
+
text
-
+
billing_contact
-
+
-
+
text
-
+
registrant_contact
-
+
-
+
text
-
+
tech_contact
-
+
-
+
text
-
+
transfer_billing_cancellation_id
-
+
-
+
int8
-
+
transfer_billing_event_id
-
+
-
+
int8
-
+
transfer_billing_recurrence_id
-
+
-
+
int8
-
+
transfer_gaining_registrar_id
-
+
-
+
text
-
+
transfer_losing_registrar_id
-
+
-
+
text
-
+
billing_recurrence_id
-
+
-
+
int8
-
+
autorenew_end_time
-
+
-
+
timestamptz
-
+
dns_refresh_request_time
-
+
-
+
timestamptz
-
+
domain_6c51cffa:w->billingevent_a57d1815:e
-
-
-
+
+
+
@@ -990,22 +990,22 @@ td.section {
domain_6c51cffa:w->billingcancellation_6eedf614:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_domain_transfer_billing_cancellation_id
domain_6c51cffa:w->billingrecurrence_5fa2cb01:e
-
-
-
+
+
+
@@ -1016,9 +1016,9 @@ td.section {
domain_6c51cffa:w->billingrecurrence_5fa2cb01:e
-
-
-
+
+
+
@@ -1029,243 +1029,243 @@ td.section {
contact_8de8cb16
-
-
+
+
public.Contact
-
-
+
+
[table]
-
+
repo_id
-
+
-
+
text not null
-
+
creation_registrar_id
-
+
-
+
text not null
-
+
creation_time
-
+
-
+
timestamptz not null
-
+
current_sponsor_registrar_id
-
+
-
+
text not null
-
+
deletion_time
-
+
-
+
timestamptz
-
+
last_epp_update_registrar_id
-
+
-
+
text
-
+
contact_id
-
+
-
+
text
-
+
search_name
-
+
-
+
text
-
+
transfer_gaining_registrar_id
-
+
-
+
text
-
+
transfer_losing_registrar_id
-
+
-
+
text
-
+
domain_6c51cffa:w->contact_8de8cb16:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_domain_admin_contact
domain_6c51cffa:w->contact_8de8cb16:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_domain_billing_contact
domain_6c51cffa:w->contact_8de8cb16:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_domain_registrant_contact
domain_6c51cffa:w->contact_8de8cb16:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_domain_tech_contact
domain_6c51cffa:w->registrar_6e1503e3:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk2jc69qyg2tv9hhnmif6oa1cx1
domain_6c51cffa:w->registrar_6e1503e3:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk2u3srsfbei272093m3b3xwj23
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_losing_registrar_id
tld_f1fa57e2
-
-
+
+
public.Tld
-
-
+
+
[table]
-
+
tld_name
-
+
-
+
text not null
-
+
domain_6c51cffa:w->tld_f1fa57e2:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_domain_tld
@@ -1336,13 +1336,13 @@ td.section {
graceperiod_cd3b2e8f:w->domain_6c51cffa:e
-
+
-
-
-
-
+
+
+
+
fk_grace_period_domain_repo_id
@@ -1362,52 +1362,52 @@ td.section {
graceperiod_cd3b2e8f:w->registrar_6e1503e3:e
-
+
-
-
-
-
+
+
+
+
fk_grace_period_registrar_id
billingrecurrence_5fa2cb01:w->domainhistory_a54cc226:e
-
+
-
-
-
-
+
+
+
+
fk_billing_recurrence_domain_history
billingrecurrence_5fa2cb01:w->domainhistory_a54cc226:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_billing_recurrence_domain_history
billingrecurrence_5fa2cb01:w->registrar_6e1503e3:e
-
-
-
-
-
-
-
+
+
+
+
+
+
+
fk_billing_recurrence_registrar_id
@@ -1480,152 +1480,152 @@ td.section {
contact_8de8cb16:w->registrar_6e1503e3:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk1sfyj7o7954prbn1exk7lpnoe
contact_8de8cb16:w->registrar_6e1503e3:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk93c185fx7chn68uv7nl6uv2s0
contact_8de8cb16:w->registrar_6e1503e3:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fkmb7tdiv85863134w1wogtxrb2
contact_8de8cb16:w->registrar_6e1503e3:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_contact_transfer_gaining_registrar_id
contact_8de8cb16:w->registrar_6e1503e3:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_contact_transfer_losing_registrar_id
contacthistory_d2964f8a
-
-
+
+
public.ContactHistory
-
-
+
+
[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
-
+
contact_repo_id
-
+
-
+
text not null
-
+
contacthistory_d2964f8a:w->contact_8de8cb16:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_contact_history_contact_repo_id
contacthistory_d2964f8a:w->registrar_6e1503e3:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_contact_history_registrar_id
@@ -1731,160 +1731,176 @@ td.section {
pollmessage_614a523e:w->domain_6c51cffa:e
-
+
-
-
-
-
-
-
+
+
+
+
+
+
fk_poll_message_domain_repo_id
pollmessage_614a523e:w->contact_8de8cb16:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_poll_message_contact_repo_id
pollmessage_614a523e:w->contacthistory_d2964f8a:e
-
+
-
-
-
-
-
+
+
+
+
+
fk_poll_message_contact_history
pollmessage_614a523e:w->contacthistory_d2964f8a:e
-
+
-
-
-
-
-
+
+
+
+
+
fk_poll_message_contact_history
pollmessage_614a523e:w->domainhistory_a54cc226:e
-
+
-
-
-
-
+
+
+
+
fk_poll_message_domain_history
pollmessage_614a523e:w->domainhistory_a54cc226:e
-
+
-
-
-
-
+
+
+
+
fk_poll_message_domain_history
host_f21b78de
-
-
+
+
public.Host
-
-
+
+
[table]
-
+
repo_id
-
+
-
+
text not null
-
+
creation_registrar_id
-
+
-
+
text
-
+
+ creation_time
+
+
+
+
+ timestamptz
+
+
current_sponsor_registrar_id
-
+
-
+
text
-
+
+ deletion_time
+
+
+
+
+ timestamptz
+
+
last_epp_update_registrar_id
-
+
-
+
text
-
+
host_name
-
+
-
+
text
-
+
superordinate_domain
-
+
-
+
text
-
+
inet_addresses
-
+
-
+
_text
-
+
pollmessage_614a523e:w->host_f21b78de:e
-
+
-
-
-
-
-
+
+
+
+
+
fk_poll_message_host_repo_id
@@ -1984,39 +2000,39 @@ td.section {
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_losing_registrar_id
@@ -2071,92 +2087,92 @@ td.section {
delegationsignerdata_e542a872
-
-
+
+
public.DelegationSignerData
-
-
+
+
[table]
-
+
domain_repo_id
-
+
-
+
text not null
-
+
key_tag
-
+
-
+
int4 not null
-
+
algorithm
-
+
-
+
int4 not null
-
+
digest
-
+
-
+
bytea not null
-
+
digest_type
-
+
-
+
int4 not null
-
+
delegationsignerdata_e542a872:w->domain_6c51cffa:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fktr24j9v14ph2mfuw2gsmt12kq
domainhistory_a54cc226:w->domain_6c51cffa:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_domain_history_domain_repo_id
domainhistory_a54cc226:w->registrar_6e1503e3:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_domain_history_registrar_id
@@ -2190,79 +2206,79 @@ td.section {
domainhost_1ea127c2:w->domain_6c51cffa:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fkfmi7bdink53swivs390m2btxg
domainhost_1ea127c2:w->host_f21b78de:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_domainhost_host_valid
host_f21b78de:w->domain_6c51cffa:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_host_superordinate_domain
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_last_epp_update_registrar_id
@@ -2304,27 +2320,27 @@ td.section {
domaindsdatahistory_995b060d:w->domainhistory_a54cc226:e
-
-
+
+
-
-
-
-
+
+
+
+
fko4ilgyyfnvppbpuivus565i0j
domaindsdatahistory_995b060d:w->domainhistory_a54cc226:e
-
-
+
+
-
-
-
-
-
+
+
+
+
+
fko4ilgyyfnvppbpuivus565i0j
@@ -2366,26 +2382,26 @@ td.section {
domainhistoryhost_9f3f23ee:w->domainhistory_a54cc226:e
-
+
-
-
-
-
-
+
+
+
+
+
fka9woh3hu8gx5x0vly6bai327n
domainhistoryhost_9f3f23ee:w->domainhistory_a54cc226:e
-
-
-
-
-
-
-
+
+
+
+
+
+
+
fka9woh3hu8gx5x0vly6bai327n
@@ -2441,40 +2457,40 @@ td.section {
domaintransactionrecord_6e77ff61:w->domainhistory_a54cc226:e
-
+
-
-
-
-
+
+
+
+
fkcjqe54u72kha71vkibvxhjye7
domaintransactionrecord_6e77ff61:w->domainhistory_a54cc226:e
-
+
-
-
-
-
+
+
+
+
fkcjqe54u72kha71vkibvxhjye7
domaintransactionrecord_6e77ff61:w->tld_f1fa57e2:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_domain_transaction_record_tld
@@ -2516,53 +2532,53 @@ td.section {
graceperiodhistory_40ccc1f1:w->domainhistory_a54cc226:e
-
+
-
-
-
-
+
+
+
+
fk7w3cx8d55q8bln80e716tr7b8
graceperiodhistory_40ccc1f1:w->domainhistory_a54cc226:e
-
+
-
-
-
-
+
+
+
+
fk7w3cx8d55q8bln80e716tr7b8
hosthistory_56210c2:w->host_f21b78de:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_hosthistory_host
hosthistory_56210c2:w->registrar_6e1503e3:e
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
fk_history_registrar_id
@@ -2742,13 +2758,13 @@ td.section {
registrarpoc_ab47054d:w->registrar_6e1503e3:e
-
+
-
-
-
-
+
+
+
+
fk_registrar_poc_registrar_id
@@ -5255,11 +5271,21 @@ td.section {
creation_registrar_id |
text |
+
+ |
+ creation_time |
+ timestamptz |
+
|
current_sponsor_registrar_id |
text |
+
+ |
+ deletion_time |
+ timestamptz |
+
|
last_epp_update_registrar_id |
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 f5ef6ae78..658eff033 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 {
generated on |
- 2022-03-14 17:59:44.31197 |
+ 2022-03-15 20:34:14.292487 |
last flyway file |
- V112__add_billingrecurrence_missing_indexes.sql |
+ V113__add_host_missing_indexes.sql |
@@ -274,19 +274,19 @@ td.section {