diff --git a/core/src/main/java/google/registry/model/domain/token/AllocationToken.java b/core/src/main/java/google/registry/model/domain/token/AllocationToken.java index 09fe23746..96e894ed8 100644 --- a/core/src/main/java/google/registry/model/domain/token/AllocationToken.java +++ b/core/src/main/java/google/registry/model/domain/token/AllocationToken.java @@ -76,6 +76,8 @@ import org.joda.time.DateTime; @javax.persistence.Index( columnList = "domainName", name = "allocation_token_domain_name_idx"), + @javax.persistence.Index(columnList = "tokenType"), + @javax.persistence.Index(columnList = "redemption_domain_repo_id") }) public class AllocationToken extends BackupGroupRoot implements Buildable, DatastoreAndSqlEntity { 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 32832528c..b51ce354b 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,19 +261,19 @@ td.section { generated on - 2022-03-15 20:34:15.683737 + 2022-03-16 18:17:28.401054 last flyway file - V113__add_host_missing_indexes.sql + V114__add_allocation_token_indexes.sql

 

 

- + SchemaCrawler_Diagram - + generated by @@ -284,57 +284,89 @@ td.section { generated on - 2022-03-15 20:34:15.683737 + 2022-03-16 18:17:28.401054 allocationtoken_a08ccbef - - + + public.AllocationToken - - + + [table] - + token - + - + text not null - + domain_name - + - + text - + + redemption_domain_repo_id + + + + + text + + + token_type + + + + + text + + billingevent_a57d1815 - - + + public.BillingEvent - - + + [table] - + billing_event_id + + + + int8 not null + + + registrar_id + + + + + text not null + + + domain_history_revision_id + int8 not null - registrar_id + domain_repo_id @@ -342,39 +374,39 @@ td.section { text not null - domain_history_revision_id + event_time - int8 not null + timestamptz not null - domain_repo_id + allocation_token - text not null + text - event_time + billing_time - timestamptz not null + timestamptz - allocation_token + cancellation_matching_billing_recurrence_id - text + int8 - billing_time + synthetic_creation_time @@ -382,64 +414,64 @@ td.section { timestamptz - cancellation_matching_billing_recurrence_id + recurrence_history_revision_id int8 - - synthetic_creation_time - - - - - timestamptz - - - recurrence_history_revision_id - - - - - int8 - - + 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 - registrar_id + domain_repo_id @@ -447,241 +479,241 @@ td.section { text not null - domain_history_revision_id + event_time - int8 not null + timestamptz not null - domain_repo_id + recurrence_end_time - text not null + timestamptz - event_time + recurrence_time_of_year - timestamptz not null - - - recurrence_end_time - - - - - timestamptz - - - recurrence_time_of_year - - - - text - + billingevent_a57d1815:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_billing_event_cancellation_matching_billing_recurrence_id domainhistory_a54cc226 - - + + public.DomainHistory - - + + [table] - + history_revision_id + + + + int8 not null + + + history_registrar_id + + + + + text + + + history_modification_time + - int8 not null + timestamptz not null - history_registrar_id + history_type - text + text not null - history_modification_time + creation_time - timestamptz not null + timestamptz - - history_type + + domain_repo_id 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 - - 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 - registrar_id + domain_repo_id @@ -689,140 +721,140 @@ td.section { text not null - domain_history_revision_id + event_time - int8 not null + timestamptz not null - domain_repo_id + billing_time - text not null + timestamptz - event_time + billing_event_id - timestamptz not null + int8 - billing_time + billing_recurrence_id - timestamptz - - - billing_event_id - - - - int8 - - billing_recurrence_id - - - - - int8 - - + billingcancellation_6eedf614:w->billingevent_a57d1815:e - - - - - - - - + + + + + + + + fk_billing_cancellation_billing_event_id 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 + - text not null + timestamptz not null - creation_registrar_id + current_sponsor_registrar_id @@ -830,31 +862,31 @@ td.section { text not null - creation_time + deletion_time - timestamptz not null + timestamptz - current_sponsor_registrar_id + last_epp_update_registrar_id - text not null + text - deletion_time + domain_name - timestamptz + text - last_epp_update_registrar_id + tld @@ -862,7 +894,7 @@ td.section { text - domain_name + admin_contact @@ -870,7 +902,7 @@ td.section { text - tld + billing_contact @@ -878,7 +910,7 @@ td.section { text - admin_contact + registrant_contact @@ -886,7 +918,7 @@ td.section { text - billing_contact + tech_contact @@ -894,23 +926,23 @@ td.section { text - registrant_contact + transfer_billing_cancellation_id - text + int8 - tech_contact + transfer_billing_event_id - text + int8 - transfer_billing_cancellation_id + transfer_billing_recurrence_id @@ -918,135 +950,135 @@ td.section { int8 - transfer_billing_event_id + transfer_gaining_registrar_id - int8 + text - transfer_billing_recurrence_id + transfer_losing_registrar_id - int8 + text - transfer_gaining_registrar_id + billing_recurrence_id - text + int8 - transfer_losing_registrar_id + autorenew_end_time - text + timestamptz - billing_recurrence_id + dns_refresh_request_time - int8 - - - autorenew_end_time - - - - timestamptz - - dns_refresh_request_time - - - - - timestamptz - - + domain_6c51cffa:w->billingevent_a57d1815:e - - - - - - - - + + + + + + + + fk_domain_transfer_billing_event_id domain_6c51cffa:w->billingcancellation_6eedf614:e - - - - - - - - + + + + + + + + fk_domain_transfer_billing_cancellation_id domain_6c51cffa:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_domain_billing_recurrence_id domain_6c51cffa:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_domain_transfer_billing_recurrence_id contact_8de8cb16 - - + + public.Contact - - + + [table] - + repo_id + + + + text not null + + + creation_registrar_id + + + + + text not null + + + creation_time + - text not null + timestamptz not null - creation_registrar_id + current_sponsor_registrar_id @@ -1054,31 +1086,31 @@ td.section { text not null - creation_time + deletion_time - timestamptz not null + timestamptz - current_sponsor_registrar_id + last_epp_update_registrar_id - text not null + text - deletion_time + contact_id - timestamptz + text - last_epp_update_registrar_id + search_name @@ -1086,7 +1118,7 @@ td.section { text - contact_id + transfer_gaining_registrar_id @@ -1094,569 +1126,569 @@ td.section { text - search_name + transfer_losing_registrar_id 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 graceperiod_cd3b2e8f - - + + public.GracePeriod - - + + [table] - + grace_period_id + + + + int8 not null + + + billing_event_id + + + + + int8 + + + billing_recurrence_id + - int8 not null + int8 - billing_event_id + registrar_id - int8 + text not null - billing_recurrence_id + domain_repo_id - int8 - - - registrar_id - - - - text not null - - domain_repo_id - - - - - text not null - - + graceperiod_cd3b2e8f:w->billingevent_a57d1815:e - - - - - - - - + + + + + + + + fk_grace_period_billing_event_id graceperiod_cd3b2e8f:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fk_grace_period_domain_repo_id graceperiod_cd3b2e8f:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_grace_period_billing_recurrence_id 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 claimsentry_105da9f1 - - + + public.ClaimsEntry - - + + [table] - + revision_id - + - + int8 not null - + domain_label - + - + text not null - + claimslist_3d49bc2b - - + + public.ClaimsList - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + claimsentry_105da9f1:w->claimslist_3d49bc2b:e - - - - - - - - + + + + + + + + fk6sc6at5hedffc0nhdcab6ivuq 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 + - int8 not null + timestamptz not null - history_registrar_id + history_type - text + text not null - history_modification_time + creation_time - timestamptz not null + timestamptz - - history_type + + contact_repo_id 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 pollmessage_614a523e - - + + public.PollMessage - - + + [table] - + poll_message_id + + + + int8 not null + + + registrar_id + + + + + text not null + + + contact_repo_id + - int8 not null + text - registrar_id + contact_history_revision_id - text not null + int8 - contact_repo_id + domain_repo_id @@ -1664,7 +1696,7 @@ td.section { text - contact_history_revision_id + domain_history_revision_id @@ -1672,31 +1704,31 @@ td.section { int8 - domain_repo_id + event_time - text + timestamptz not null - domain_history_revision_id + host_repo_id - int8 + text - event_time + host_history_revision_id - timestamptz not null + int8 - host_repo_id + transfer_response_gaining_registrar_id @@ -1704,129 +1736,129 @@ td.section { text - host_history_revision_id + transfer_response_losing_registrar_id - int8 - - - transfer_response_gaining_registrar_id - - - - text - - transfer_response_losing_registrar_id - - - - - text - - + 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 + - text not null + timestamptz - creation_registrar_id + current_sponsor_registrar_id @@ -1834,7 +1866,7 @@ td.section { text - creation_time + deletion_time @@ -1842,7 +1874,7 @@ td.section { timestamptz - current_sponsor_registrar_id + last_epp_update_registrar_id @@ -1850,15 +1882,15 @@ td.section { text - deletion_time + host_name - timestamptz + text - last_epp_update_registrar_id + superordinate_domain @@ -1866,64 +1898,64 @@ td.section { text - host_name + inet_addresses - text - - - superordinate_domain - - - - - text - - - inet_addresses - - - - _text - + pollmessage_614a523e:w->host_f21b78de:e - - - - - - - - + + + + + + + + fk_poll_message_host_repo_id hosthistory_56210c2 - - + + public.HostHistory - - + + [table] - + history_revision_id + + + + int8 not null + + + history_registrar_id + + + + + text not null + + + history_modification_time + - int8 not null + timestamptz not null - history_registrar_id + history_type @@ -1931,794 +1963,778 @@ td.section { text not null - history_modification_time + host_name - timestamptz not null + text - history_type + creation_time - text not null + timestamptz - - host_name + + host_repo_id - text - - - creation_time - - - - - timestamptz - - - host_repo_id - - - - text not null - + pollmessage_614a523e:w->hosthistory_56210c2:e - - - - - - - - + + + + + + + + fk_poll_message_host_history pollmessage_614a523e:w->hosthistory_56210c2:e - - - - - - - - + + + + + + + + fk_poll_message_host_history 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 cursor_6af40e8c - - + + public."Cursor" - - + + [table] - + "scope" - + - + text not null - + type - + - + text not null - + databasemigrationstateschedule_22edefab - - + + public.DatabaseMigrationStateSchedule - - + + [table] - + id - + - + int8 not null - + delegationsignerdata_e542a872 - - + + public.DelegationSignerData - - + + [table] - + domain_repo_id + + + + text not null + + + key_tag + + + + + int4 not null + + + algorithm + - text not null + int4 not null - key_tag + digest - int4 not null + bytea not null - algorithm + digest_type 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 domainhost_1ea127c2 - - + + public.DomainHost - - + + [table] - + domain_repo_id - + - + text not null - + host_repo_id - + - + text - + 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 domaindsdatahistory_995b060d - - + + public.DomainDsDataHistory - - + + [table] - + ds_data_history_revision_id + + + + int8 not null + + + domain_history_revision_id + + + + + int8 not null + + + domain_repo_id + - int8 not null - - - domain_history_revision_id - - - - - int8 not null - - - domain_repo_id - - - - text - + domaindsdatahistory_995b060d:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fko4ilgyyfnvppbpuivus565i0j domaindsdatahistory_995b060d:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fko4ilgyyfnvppbpuivus565i0j domainhistoryhost_9f3f23ee - - + + public.DomainHistoryHost - - + + [table] - + domain_history_history_revision_id + + + + int8 not null + + + host_repo_id + + + + + text + + + domain_history_domain_repo_id + - int8 not null - - - host_repo_id - - - - - text - - - domain_history_domain_repo_id - - - - text not null - + domainhistoryhost_9f3f23ee:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fka9woh3hu8gx5x0vly6bai327n domainhistoryhost_9f3f23ee:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fka9woh3hu8gx5x0vly6bai327n domaintransactionrecord_6e77ff61 - - + + public.DomainTransactionRecord - - + + [table] - + id + + + + bigserial not null + + + + + auto-incremented + + + tld + - bigserial not null + text not null + + + domain_repo_id - auto-incremented + text - tld + history_revision_id - text not null - - - domain_repo_id - - - - - text - - - history_revision_id - - - - int8 - + 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 graceperiodhistory_40ccc1f1 - - + + public.GracePeriodHistory - - + + [table] - + grace_period_history_revision_id + + + + int8 not null + + + domain_repo_id + + + + + text not null + + + domain_history_revision_id + - int8 not null - - - domain_repo_id - - - - - text not null - - - domain_history_revision_id - - - - int8 - + 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 lock_f21d4861 - - + + public.Lock - - + + [table] - + resource_name - + - + text not null - + "scope" - + - + text not null - + premiumentry_b0060b91 - - + + public.PremiumEntry - - + + [table] - + revision_id - + - + int8 not null - + domain_label - + - + text not null - + premiumlist_7c3ea68b - - + + public.PremiumList - - + + [table] - + revision_id + + + + bigserial not null + + + + + auto-incremented + + + name + - bigserial not null - - - - - auto-incremented - - - name - - - - text not null - + premiumentry_b0060b91:w->premiumlist_7c3ea68b:e - - - - - - - - + + + + + + + + fko0gw90lpo1tuee56l0nb6y6g5 rderevision_83396864 - - + + public.RdeRevision - - + + [table] - + tld + + + + text not null + + + mode + + + + + text not null + + + "date" + - text not null - - - mode - - - - - text not null - - - "date" - - - - date not null - + registrarpoc_ab47054d @@ -2758,42 +2774,58 @@ td.section { registrarpoc_ab47054d:w->registrar_6e1503e3:e - + - - - - + + + + fk_registrar_poc_registrar_id registrylock_ac88663e - - + + public.RegistryLock - - + + [table] - + revision_id + + + + bigserial not null + + + + + auto-incremented + + + registrar_id + - bigserial not null + text not null + + + repo_id - auto-incremented + text not null - registrar_id + verification_code @@ -2801,317 +2833,301 @@ td.section { text not null - repo_id + relock_revision_id - text not null - - - verification_code - - - - - text not null - - - relock_revision_id - - - - int8 - + registrylock_ac88663e:w->registrylock_ac88663e:e - - - - - - - - + + + + + + + + fk2lhcwpxlnqijr96irylrh1707 reservedentry_1a7b8520 - - + + public.ReservedEntry - - + + [table] - + revision_id - + - + int8 not null - + domain_label - + - + text not null - + reservedlist_b97c3f1c - - + + public.ReservedList - - + + [table] - + revision_id + + + + bigserial not null + + + + + auto-incremented + + + name + - bigserial not null - - - - - auto-incremented - - - name - - - - text not null - + reservedentry_1a7b8520:w->reservedlist_b97c3f1c:e - - - - - - - - + + + + + + + + fkgq03rk0bt1hb915dnyvd3vnfc serversecret_6cc90f09 - - + + public.ServerSecret - - + + [table] - + id - + - + int8 not null - + signedmarkrevocationentry_99c39721 - - + + public.SignedMarkRevocationEntry - - + + [table] - + revision_id - + - + int8 not null - + smd_id - + - + text not null - + signedmarkrevocationlist_c5d968fb - - + + public.SignedMarkRevocationList - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + signedmarkrevocationentry_99c39721:w->signedmarkrevocationlist_c5d968fb:e - - - - - - - - + + + + + + + + fk5ivlhvs3121yx2li5tqh54u4 spec11threatmatch_a61228a6 - - + + public.Spec11ThreatMatch - - + + [table] - + id + + + + bigserial not null + + + + + auto-incremented + + + check_date + - bigserial not null + date not null + + + registrar_id - auto-incremented + text not null - check_date + tld - date not null - - - registrar_id - - - - text not null - - tld - - - - - text not null - - + sqlreplaycheckpoint_342081b3 - - + + public.SqlReplayCheckpoint - - + + [table] - + id - + - + int8 not null - + tmchcrl_d282355 - - + + public.TmchCrl - - + + [table] - + id - + - + int8 not null - + transaction_d50389d4 - - + + public.Transaction - - + + [table] - + id - + - + bigserial not null - + - + auto-incremented - + @@ -3130,6 +3146,16 @@ td.section { domain_name text +
+ + redemption_domain_repo_id + text +
+
+ + token_type + 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 658eff033..9be7e8846 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-15 20:34:14.292487 + 2022-03-16 18:17:27.007916
last flyway file - V113__add_host_missing_indexes.sql + V114__add_allocation_token_indexes.sql
@@ -284,7 +284,7 @@ td.section { generated on - 2022-03-15 20:34:14.292487 + 2022-03-16 18:17:27.007916 @@ -6698,6 +6698,18 @@ td.section {
+
+ idxtmlqd31dpvvd2g1h9i7erw6aj + [non-unique index] +
+
+ + redemption_domain_repo_id + ascending +
+
+ +
AllocationToken_pkey [unique index] @@ -6707,6 +6719,18 @@ td.section { token ascending
+
+ +
+
+ idx9g3s7mjv1yn4t06nqid39whss + [non-unique index] +
+
+ + token_type + ascending +

 

diff --git a/db/src/main/resources/sql/flyway.txt b/db/src/main/resources/sql/flyway.txt index 305aad992..974dd3a39 100644 --- a/db/src/main/resources/sql/flyway.txt +++ b/db/src/main/resources/sql/flyway.txt @@ -111,3 +111,4 @@ V110__add_graceperiod_missing_indexes_from_query_analyzer.sql V111__add_billingcancellation_missing_indexes.sql V112__add_billingrecurrence_missing_indexes.sql V113__add_host_missing_indexes.sql +V114__add_allocation_token_indexes.sql diff --git a/db/src/main/resources/sql/flyway/V114__add_allocation_token_indexes.sql b/db/src/main/resources/sql/flyway/V114__add_allocation_token_indexes.sql new file mode 100644 index 000000000..6976b06f9 --- /dev/null +++ b/db/src/main/resources/sql/flyway/V114__add_allocation_token_indexes.sql @@ -0,0 +1,17 @@ +-- Copyright 2022 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 IDX9g3s7mjv1yn4t06nqid39whss ON "AllocationToken" (token_type); +CREATE INDEX IDXtmlqd31dpvvd2g1h9i7erw6aj ON "AllocationToken" (redemption_domain_repo_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 209334c42..4c1a5dec1 100644 --- a/db/src/main/resources/sql/schema/db-schema.sql.generated +++ b/db/src/main/resources/sql/schema/db-schema.sql.generated @@ -759,6 +759,8 @@ primary key (id) ); create index allocation_token_domain_name_idx on "AllocationToken" (domain_name); +create index IDX9g3s7mjv1yn4t06nqid39whss on "AllocationToken" (token_type); +create index IDXtmlqd31dpvvd2g1h9i7erw6aj on "AllocationToken" (redemption_domain_repo_id); create index IDXih4b2tea127p5rb61gje6e1y2 on "BillingCancellation" (registrar_id); create index IDX2exdfbx6oiiwnhr8j6gjpqt2j on "BillingCancellation" (event_time); create index IDXl8vobbecsd32k4ksavdfx8st6 on "BillingCancellation" (domain_repo_id); diff --git a/db/src/main/resources/sql/schema/nomulus.golden.sql b/db/src/main/resources/sql/schema/nomulus.golden.sql index 9b7d7eddf..2cea47a79 100644 --- a/db/src/main/resources/sql/schema/nomulus.golden.sql +++ b/db/src/main/resources/sql/schema/nomulus.golden.sql @@ -1623,6 +1623,13 @@ CREATE INDEX idx73l103vc5900ig3p4odf0cngt ON public."BillingEvent" USING btree ( CREATE INDEX idx8nr0ke9mrrx4ewj6pd2ag4rmr ON public."Domain" USING btree (creation_time); +-- +-- Name: idx9g3s7mjv1yn4t06nqid39whss; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX idx9g3s7mjv1yn4t06nqid39whss ON public."AllocationToken" USING btree (token_type); + + -- -- Name: idx9q53px6r302ftgisqifmc6put; Type: INDEX; Schema: public; Owner: - -- @@ -1945,6 +1952,13 @@ CREATE INDEX idxsu1nam10cjes9keobapn5jvxj ON public."DomainHistory" USING btree CREATE INDEX idxsudwswtwqnfnx2o1hx4s0k0g5 ON public."ContactHistory" USING btree (history_modification_time); +-- +-- Name: idxtmlqd31dpvvd2g1h9i7erw6aj; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX idxtmlqd31dpvvd2g1h9i7erw6aj ON public."AllocationToken" USING btree (redemption_domain_repo_id); + + -- -- Name: idxy98mebut8ix1v07fjxxdkqcx; Type: INDEX; Schema: public; Owner: - --