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 3aaf6aae2..0ec66c55a 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,20 +261,20 @@ td.section { generated on - 2023-10-04 16:08:55.700762 + 2023-11-02 18:26:18.901466 last flyway file - V147__drop_gaia_id_from_user.sql + V149__add_bsa_domain_in_use_table.sql

 

 

- - + + SchemaCrawler_Diagram - + generated by @@ -285,7 +285,7 @@ td.section { generated on - 2023-10-04 16:08:55.700762 + 2023-11-02 18:26:18.901466 @@ -334,319 +334,319 @@ td.section { billingevent_a57d1815 - - + + public.BillingEvent - - + + [table] - + billing_event_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 - + allocation_token - + - + text - + billing_time - + - + timestamptz - + cancellation_matching_billing_recurrence_id - + - + int8 - + synthetic_creation_time - + - + timestamptz - + recurrence_history_revision_id - + - + int8 - + billingevent_a57d1815:w->allocationtoken_a08ccbef:e - - - - - - - + + + + + + + fk_billing_event_allocation_token domainhistory_a54cc226 - - + + public.DomainHistory - - + + [table] - + history_revision_id - + - + int8 not null - + history_registrar_id - + - + text - + history_modification_time - + - + timestamptz not null - + history_type - + - + text not null - + creation_time - + - + timestamptz - + domain_repo_id - + - + text not null - + current_package_token - + - + text - - - - 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 + + + + + + + + + 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 billingrecurrence_5fa2cb01 - - + + public.BillingRecurrence - - + + [table] - + billing_recurrence_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 - + recurrence_end_time - + - + timestamptz - + recurrence_time_of_year - + - + text - + recurrence_last_expansion - + - + timestamptz not null - + billingevent_a57d1815:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_billing_event_cancellation_matching_billing_recurrence_id - + registrar_6e1503e3 @@ -682,16 +682,16 @@ td.section { - + billingevent_a57d1815:w->registrar_6e1503e3:e - - - + + + - + fk_billing_event_registrar_id @@ -890,14 +890,14 @@ td.section { domain_6c51cffa:w->billingevent_a57d1815:e - + - - - - - + + + + + fk_domain_transfer_billing_event_id @@ -992,31 +992,31 @@ td.section { 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 @@ -1108,7 +1108,7 @@ td.section { - + domain_6c51cffa:w->contact_8de8cb16:e @@ -1121,7 +1121,7 @@ td.section { fk_domain_admin_contact - + domain_6c51cffa:w->contact_8de8cb16:e @@ -1134,7 +1134,7 @@ td.section { fk_domain_billing_contact - + domain_6c51cffa:w->contact_8de8cb16:e @@ -1147,7 +1147,7 @@ td.section { fk_domain_registrant_contact - + domain_6c51cffa:w->contact_8de8cb16:e @@ -1160,7 +1160,7 @@ td.section { fk_domain_tech_contact - + domain_6c51cffa:w->registrar_6e1503e3:e @@ -1173,7 +1173,7 @@ td.section { fk2jc69qyg2tv9hhnmif6oa1cx1 - + domain_6c51cffa:w->registrar_6e1503e3:e @@ -1186,7 +1186,7 @@ td.section { fk2u3srsfbei272093m3b3xwj23 - + domain_6c51cffa:w->registrar_6e1503e3:e @@ -1199,7 +1199,7 @@ td.section { fkjc0r9r5y1lfbt4gpbqw4wsuvq - + domain_6c51cffa:w->registrar_6e1503e3:e @@ -1212,7 +1212,7 @@ td.section { fk_domain_transfer_gaining_registrar_id - + domain_6c51cffa:w->registrar_6e1503e3:e @@ -1225,7 +1225,7 @@ td.section { fk_domain_transfer_losing_registrar_id - + tld_f1fa57e2 @@ -1245,7 +1245,7 @@ td.section { - + domain_6c51cffa:w->tld_f1fa57e2:e @@ -1260,96 +1260,96 @@ td.section { domainhistory_a54cc226:w->allocationtoken_a08ccbef:e - - - + + + - + fk_domain_history_current_package_token - + domainhistory_a54cc226:w->domain_6c51cffa:e - - - + + + - + - + fk_domain_history_domain_repo_id - + domainhistory_a54cc226:w->registrar_6e1503e3:e - - - - + + + + - - - + + + fk_domain_history_registrar_id billingcancellation_6eedf614:w->billingevent_a57d1815:e - + - - - - - + + + + + fk_billing_cancellation_billing_event_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->domainhistory_a54cc226:e + - - - - + + + + fk_billing_cancellation_domain_history billingcancellation_6eedf614:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_billing_cancellation_billing_recurrence_id - + billingcancellation_6eedf614:w->registrar_6e1503e3:e @@ -1364,214 +1364,308 @@ td.section { graceperiod_cd3b2e8f - - + + public.GracePeriod - - + + [table] - + grace_period_id - + - + int8 not null - + billing_event_id - + - + int8 - + billing_recurrence_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 + bsadomaininuse_a4bacea4 + + + public.BsaDomainInUse - - + + [table] - - revision_id + + label - + - - int8 not null - - - domain_label - - - - + text not null - - - - claimslist_3d49bc2b - - - public.ClaimsList + + tld - - + + + + text not null + + + + + bsalabel_2755e1da + + + public.BsaLabel + + + [table] - - revision_id + + label - + - + + text not null + + + + + bsadomaininuse_a4bacea4:w->bsalabel_2755e1da:e + + + + + + + + + fkbsadomaininuse2label + + + + bsadownload_98d031ce + + + public.BsaDownload + + + + [table] + + + job_id + + + + bigserial not null - + - + auto-incremented - + + creation_time + + + + + timestamptz not null + + + + + 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 @@ -1584,7 +1678,7 @@ td.section { fk1sfyj7o7954prbn1exk7lpnoe - + contact_8de8cb16:w->registrar_6e1503e3:e @@ -1597,7 +1691,7 @@ td.section { fk93c185fx7chn68uv7nl6uv2s0 - + contact_8de8cb16:w->registrar_6e1503e3:e @@ -1610,7 +1704,7 @@ td.section { fkmb7tdiv85863134w1wogtxrb2 - + contact_8de8cb16:w->registrar_6e1503e3:e @@ -1623,7 +1717,7 @@ td.section { fk_contact_transfer_gaining_registrar_id - + contact_8de8cb16:w->registrar_6e1503e3:e @@ -1636,7 +1730,7 @@ td.section { fk_contact_transfer_losing_registrar_id - + contacthistory_d2964f8a @@ -1696,7 +1790,7 @@ td.section { - + contacthistory_d2964f8a:w->contact_8de8cb16:e @@ -1709,7 +1803,7 @@ td.section { fk_contact_history_contact_repo_id - + contacthistory_d2964f8a:w->registrar_6e1503e3:e @@ -1722,7 +1816,7 @@ td.section { fk_contact_history_registrar_id - + pollmessage_614a523e @@ -1822,59 +1916,59 @@ td.section { - + pollmessage_614a523e:w->domain_6c51cffa:e - + - + - - - + + + fk_poll_message_domain_repo_id - - pollmessage_614a523e:w->domainhistory_a54cc226:e - - - - - - - - - fk_poll_message_domain_history - - pollmessage_614a523e:w->domainhistory_a54cc226:e - + + + + + + + + + fk_poll_message_domain_history + + + + pollmessage_614a523e:w->domainhistory_a54cc226:e + - - - - - - + + + + + + fk_poll_message_domain_history - + pollmessage_614a523e:w->contact_8de8cb16:e - + - + fk_poll_message_contact_repo_id - + pollmessage_614a523e:w->contacthistory_d2964f8a:e @@ -1887,7 +1981,7 @@ td.section { fk_poll_message_contact_history - + pollmessage_614a523e:w->contacthistory_d2964f8a:e @@ -1900,104 +1994,104 @@ td.section { fk_poll_message_contact_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 - + hosthistory_56210c2 @@ -2065,7 +2159,7 @@ td.section { - + pollmessage_614a523e:w->hosthistory_56210c2:e @@ -2078,7 +2172,7 @@ td.section { fk_poll_message_host_history - + pollmessage_614a523e:w->hosthistory_56210c2:e @@ -2091,7 +2185,7 @@ td.section { fk_poll_message_host_history - + pollmessage_614a523e:w->registrar_6e1503e3:e @@ -2104,11 +2198,11 @@ td.section { fk_poll_message_registrar_id - + pollmessage_614a523e:w->registrar_6e1503e3:e - - - + + + @@ -2117,9 +2211,9 @@ td.section { fk_poll_message_transfer_response_gaining_registrar_id - + pollmessage_614a523e:w->registrar_6e1503e3:e - + @@ -2130,141 +2224,141 @@ td.section { fk_poll_message_transfer_response_losing_registrar_id - + cursor_6af40e8c - - + + public."Cursor" - - + + [table] - + "scope" - + - + text not null - + type - + - + text not null - + - + 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 - + dnsrefreshrequest_4e6affb3 - - + + public.DnsRefreshRequest - - + + [table] - + id - + - + bigserial not null - + - + auto-incremented - + request_time - + - + timestamptz not null - + last_process_time - + - + timestamptz not null - + - + domainhost_1ea127c2 @@ -2292,50 +2386,50 @@ 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 - - - + + + @@ -2344,11 +2438,11 @@ td.section { fk_host_creation_registrar_id - + host_f21b78de:w->registrar_6e1503e3:e - - - + + + @@ -2357,11 +2451,11 @@ td.section { fk_host_current_sponsor_registrar_id - + host_f21b78de:w->registrar_6e1503e3:e - - - + + + @@ -2370,298 +2464,298 @@ td.section { 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 - + - + 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 - + - + 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 - + - + 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->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 - - - - graceperiodhistory_40ccc1f1:w->domainhistory_a54cc226:e - - - - - - - - - fk7w3cx8d55q8bln80e716tr7b8 - + 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 - - - + + + @@ -2670,178 +2764,178 @@ td.section { fk_history_registrar_id - + lock_f21d4861 - - + + public.Lock - - + + [table] - + resource_name - + - + text not null - + "scope" - + - + text not null - + - + packagepromotion_56aa33 - - + + public.PackagePromotion - - + + [table] - + package_promotion_id - + - + bigserial not null - + - + auto-incremented - + token - + - + 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 - + - + text not null - + - + premiumentry_b0060b91:w->premiumlist_7c3ea68b:e - - - - - - - - + + + + + + + + fko0gw90lpo1tuee56l0nb6y6g5 - + rderevision_83396864 - - + + public.RdeRevision - - + + [table] - + tld - + - + text not null - + mode - + - + text not null - + "date" - + - + date not null - + - + registrarpoc_ab47054d @@ -2877,7 +2971,7 @@ td.section { - + registrarpoc_ab47054d:w->registrar_6e1503e3:e @@ -2890,337 +2984,337 @@ td.section { fk_registrar_poc_registrar_id - + registrylock_ac88663e - - + + public.RegistryLock - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + registrar_id - + - + text not null - + repo_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 - + - + 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 - + - + date not null - + registrar_id - + - + text not null - + tld - + - + text not null - + - + tmchcrl_d282355 - - + + public.TmchCrl - - + + [table] - + id - + - + int8 not null - + - + user_f2216f01 - - + + public."User" - - + + [table] - + id - + - + bigserial not null - + - + auto-incremented - + email_address - + - + text not null - + @@ -3799,6 +3893,155 @@ td.section {

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ public.BsaDomainInUse [table] +
labeltext not null
tldtext not null
Primary Key
BsaDomainInUse_pkey[primary key]
label
tld
Foreign Keys
fkbsadomaininuse2label[foreign key, on update no action, on delete cascade]
label (0..many)→ public.BsaLabel.label
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ public.BsaDownload [table] +
job_idbigserial not null
auto-incremented
creation_timetimestamptz not null
Primary Key
BsaDownload_pkey[primary key]
job_id
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ public.BsaLabel [table] +
labeltext not null
Primary Key
BsaLabel_pkey[primary key]
label
Foreign Keys
fkbsadomaininuse2label[foreign key, on update no action, on delete cascade]
label ←(0..many) public.BsaDomainInUse.label
+

 

- + - +
public.ClaimsEntry [table] 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 db73dd2d5..7ae8f3bbb 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,20 +261,20 @@ td.section {
generated on2023-10-04 16:08:53.3880052023-11-02 18:26:17.120498
last flyway fileV147__drop_gaia_id_from_user.sqlV149__add_bsa_domain_in_use_table.sql

 

 

- - + + SchemaCrawler_Diagram - + generated by @@ -285,7 +285,7 @@ td.section { generated on - 2023-10-04 16:08:53.388005 + 2023-11-02 18:26:17.120498 @@ -1129,20 +1129,20 @@ td.section { - + billingevent_a57d1815:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fk_billing_event_domain_history - + billingevent_a57d1815:w->domainhistory_a54cc226:e @@ -1155,558 +1155,558 @@ td.section { 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 billingrecurrence_5fa2cb01 - - + + public.BillingRecurrence - - + + [table] - + billing_recurrence_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 - + flags - + - + _text - + reason - + - + text not null - + domain_name - + - + text not null - + recurrence_end_time - + - + timestamptz - + recurrence_time_of_year - + - + text - + renewal_price_behavior - + - + text not null - + renewal_price_currency - + - + text - + renewal_price_amount - + - + numeric(19, 2) - + recurrence_last_expansion - + - + timestamptz not null - + billingevent_a57d1815:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_billing_event_cancellation_matching_billing_recurrence_id - + registrar_6e1503e3 - - + + public.Registrar - - + + [table] - + registrar_id - + - + text not null - + allowed_tlds - + - + _text - + billing_account_map - + - + "hstore" - + block_premium_names - + - + bool not null - + client_certificate - + - + text - + client_certificate_hash - + - + text - + contacts_require_syncing - + - + bool 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_update_time - + - + timestamptz not null - + 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 - + - + bool not null - + password_salt - + - + text - + state - + - + text - + type - + - + text not null - + url - + - + text - + whois_server - + - + text - + last_expiring_cert_notification_sent_date - + - + timestamptz - + last_expiring_failover_cert_notification_sent_date - + - + timestamptz - + - + billingevent_a57d1815:w->registrar_6e1503e3:e - + - - - - + + + + fk_billing_event_registrar_id @@ -2288,31 +2288,31 @@ td.section { 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 @@ -2796,46 +2796,46 @@ td.section { - - domain_6c51cffa:w->contact_8de8cb16:e - - - - - - - - - fk_domain_admin_contact - - domain_6c51cffa:w->contact_8de8cb16:e - - - - - - - - - fk_domain_billing_contact + + + + + + + + + fk_domain_admin_contact domain_6c51cffa:w->contact_8de8cb16:e - - - - - - - - - fk_domain_registrant_contact + + + + + + + + + fk_domain_billing_contact + domain_6c51cffa:w->contact_8de8cb16:e + + + + + + + + + fk_domain_registrant_contact + + + domain_6c51cffa:w->contact_8de8cb16:e @@ -2848,72 +2848,72 @@ td.section { 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 @@ -3277,7 +3277,7 @@ td.section { - + domain_6c51cffa:w->tld_f1fa57e2:e @@ -3292,18 +3292,18 @@ td.section { domainhistory_a54cc226:w->allocationtoken_a08ccbef:e - - - + + + - - - + + + fk_domain_history_current_package_token - + domainhistory_a54cc226:w->domain_6c51cffa:e @@ -3316,16 +3316,16 @@ td.section { fk_domain_history_domain_repo_id - + domainhistory_a54cc226:w->registrar_6e1503e3:e - + - - - - - - + + + + + + fk_domain_history_registrar_id @@ -3342,20 +3342,20 @@ td.section { fk_billing_cancellation_billing_event_id - + billingcancellation_6eedf614:w->domainhistory_a54cc226:e - + - + fk_billing_cancellation_domain_history - + billingcancellation_6eedf614:w->domainhistory_a54cc226:e @@ -3370,26 +3370,26 @@ td.section { billingcancellation_6eedf614:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_billing_cancellation_billing_recurrence_id - + billingcancellation_6eedf614:w->registrar_6e1503e3:e - + - - - - + + + + fk_billing_cancellation_registrar_id @@ -3475,7 +3475,7 @@ td.section { fk_grace_period_billing_event_id - + graceperiod_cd3b2e8f:w->domain_6c51cffa:e @@ -3490,48 +3490,48 @@ td.section { 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 - - - + + + @@ -3540,175 +3540,317 @@ td.section { fk_billing_recurrence_domain_history - + billingrecurrence_5fa2cb01:w->registrar_6e1503e3:e - - - - - - - + + + + + + + fk_billing_recurrence_registrar_id - + - claimsentry_105da9f1 - - - public.ClaimsEntry + bsadomaininuse_a4bacea4 + + + public.BsaDomainInUse - - + + [table] - - revision_id + + label - + - - int8 not null - - - claim_key - - - - + text not null - - domain_label + + tld - + - + text not null - - + + creation_time + + + + + timestamptz not null + + + reason + + + + + text not null + + + + + bsalabel_2755e1da + + + public.BsaLabel + + + + [table] + + + label + + + + + text not null + + + creation_time + + + + + timestamptz not null + + + + + bsadomaininuse_a4bacea4:w->bsalabel_2755e1da:e + + + + + + + + + fkbsadomaininuse2label + + - claimslist_3d49bc2b - - - public.ClaimsList + bsadownload_98d031ce + + + public.BsaDownload - - + + [table] - - revision_id + + job_id - + - + bigserial not null - + - + auto-incremented - + + block_list_checksums + + + + + text not null + + + creation_time + + + + + timestamptz not null + + + stage + + + + + text not null + + + update_timestamp + + + + + timestamptz + + + + + claimsentry_105da9f1 + + + public.ClaimsEntry + + + + [table] + + + revision_id + + + + + int8 not null + + + claim_key + + + + + text not null + + + domain_label + + + + + text not null + + + + + claimslist_3d49bc2b + + + public.ClaimsList + + + + [table] + + + revision_id + + + + + bigserial not null + + + + + auto-incremented + + creation_timestamp - + - + timestamptz not null - + tmdb_generation_time - + - + timestamptz not null - + - + claimsentry_105da9f1:w->claimslist_3d49bc2b:e - - - - - - - - + + + + + + + + fk6sc6at5hedffc0nhdcab6ivuq - - contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - - fk1sfyj7o7954prbn1exk7lpnoe - - contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - - fk93c185fx7chn68uv7nl6uv2s0 + + + + + + + + + fk1sfyj7o7954prbn1exk7lpnoe contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - - fkmb7tdiv85863134w1wogtxrb2 + + + + + + + + + fk93c185fx7chn68uv7nl6uv2s0 contact_8de8cb16:w->registrar_6e1503e3:e - - - - - - - - - fk_contact_transfer_gaining_registrar_id + + + + + + + + + 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 @@ -4272,7 +4414,7 @@ td.section { - + contacthistory_d2964f8a:w->contact_8de8cb16:e @@ -4285,20 +4427,20 @@ td.section { fk_contact_history_contact_repo_id - + contacthistory_d2964f8a:w->registrar_6e1503e3:e - + - - - - + + + + fk_contact_history_registrar_id - + pollmessage_614a523e @@ -4526,7 +4668,7 @@ td.section { - + pollmessage_614a523e:w->domain_6c51cffa:e @@ -4539,7 +4681,7 @@ td.section { fk_poll_message_domain_repo_id - + pollmessage_614a523e:w->domainhistory_a54cc226:e @@ -4552,7 +4694,7 @@ td.section { fk_poll_message_domain_history - + pollmessage_614a523e:w->domainhistory_a54cc226:e @@ -4565,20 +4707,20 @@ td.section { fk_poll_message_domain_history - + pollmessage_614a523e:w->contact_8de8cb16:e - + - - - - - + + + + + fk_poll_message_contact_repo_id - + pollmessage_614a523e:w->contacthistory_d2964f8a:e @@ -4591,7 +4733,7 @@ td.section { fk_poll_message_contact_history - + pollmessage_614a523e:w->contacthistory_d2964f8a:e @@ -4604,7 +4746,7 @@ td.section { fk_poll_message_contact_history - + host_f21b78de @@ -4744,7 +4886,7 @@ td.section { - + pollmessage_614a523e:w->host_f21b78de:e @@ -4757,7 +4899,7 @@ td.section { fk_poll_message_host_repo_id - + hosthistory_56210c2 @@ -4977,7 +5119,7 @@ td.section { - + pollmessage_614a523e:w->hosthistory_56210c2:e @@ -4990,7 +5132,7 @@ td.section { fk_poll_message_host_history - + pollmessage_614a523e:w->hosthistory_56210c2:e @@ -5003,90 +5145,90 @@ td.section { 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 - + cursor_time - + - + timestamptz not null - + last_update_time - + - + timestamptz not null - + - + delegationsignerdata_e542a872 @@ -5138,7 +5280,7 @@ td.section { - + delegationsignerdata_e542a872:w->domain_6c51cffa:e @@ -5151,72 +5293,72 @@ td.section { fktr24j9v14ph2mfuw2gsmt12kq - + dnsrefreshrequest_4e6affb3 - - + + public.DnsRefreshRequest - - + + [table] - + id - + - + bigserial not null - + - + auto-incremented - + name - + - + text not null - + request_time - + - + timestamptz not null - + tld - + - + text not null - + type - + - + text not null - + last_process_time - + - + timestamptz not null - + - + domainhost_1ea127c2 @@ -5244,7 +5386,7 @@ td.section { - + domainhost_1ea127c2:w->domain_6c51cffa:e @@ -5257,7 +5399,7 @@ td.section { fkfmi7bdink53swivs390m2btxg - + domainhost_1ea127c2:w->host_f21b78de:e @@ -5270,7 +5412,7 @@ td.section { fk_domainhost_host_valid - + host_f21b78de:w->domain_6c51cffa:e @@ -5283,202 +5425,202 @@ td.section { 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 - + algorithm - + - + int4 not null - + digest - + - + bytea not null - + digest_type - + - + int4 not null - + domain_history_revision_id - + - + int8 not null - + key_tag - + - + int4 not null - + domain_repo_id - + - + text - - - - domaindsdatahistory_995b060d:w->domainhistory_a54cc226:e - - - - - - - - - fko4ilgyyfnvppbpuivus565i0j - + 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 - + - + text not null - - - - domainhistoryhost_9f3f23ee:w->domainhistory_a54cc226:e - - - - - - - - - fka9woh3hu8gx5x0vly6bai327n - + domainhistoryhost_9f3f23ee:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + + fka9woh3hu8gx5x0vly6bai327n + + + + domainhistoryhost_9f3f23ee:w->domainhistory_a54cc226:e + + + + + + + + fka9woh3hu8gx5x0vly6bai327n - + domaintransactionrecord_6e77ff61 @@ -5551,20 +5693,20 @@ td.section { - + domaintransactionrecord_6e77ff61:w->domainhistory_a54cc226:e - - - - - - - - + + + + + + + + fkcjqe54u72kha71vkibvxhjye7 - + domaintransactionrecord_6e77ff61:w->domainhistory_a54cc226:e @@ -5577,7 +5719,7 @@ td.section { fkcjqe54u72kha71vkibvxhjye7 - + domaintransactionrecord_6e77ff61:w->tld_f1fa57e2:e @@ -5590,117 +5732,117 @@ td.section { fk_domain_transaction_record_tld - + graceperiodhistory_40ccc1f1 - - + + public.GracePeriodHistory - - + + [table] - + grace_period_history_revision_id - + - + int8 not null - + billing_event_id - + - + int8 - + billing_recurrence_id - + - + int8 - + registrar_id - + - + text not null - + domain_repo_id - + - + text not null - + expiration_time - + - + timestamptz not null - + type - + - + text not null - + domain_history_revision_id - + - + int8 - + grace_period_id - + - + int8 not null - - - - graceperiodhistory_40ccc1f1:w->domainhistory_a54cc226:e - - - - - - - - - fk7w3cx8d55q8bln80e716tr7b8 - + graceperiodhistory_40ccc1f1:w->domainhistory_a54cc226:e - - - - - - - + + + + + + + + + fk7w3cx8d55q8bln80e716tr7b8 + + + + graceperiodhistory_40ccc1f1:w->domainhistory_a54cc226:e + + + + + + + fk7w3cx8d55q8bln80e716tr7b8 - + hosthistory_56210c2:w->host_f21b78de:e @@ -5713,303 +5855,303 @@ td.section { 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 - + acquired_time - + - + timestamptz not null - + expiration_time - + - + timestamptz not null - + - + packagepromotion_56aa33 - - + + public.PackagePromotion - - + + [table] - + package_promotion_id - + - + bigserial not null - + - + auto-incremented - + last_notification_sent - + - + timestamptz - + max_creates - + - + int4 not null - + max_domains - + - + int4 not null - + next_billing_date - + - + timestamptz not null - + package_price_amount - + - + numeric(19, 2) not null - + package_price_currency - + - + text not null - + token - + - + text not null - + - + premiumentry_b0060b91 - - + + public.PremiumEntry - - + + [table] - + revision_id - + - + int8 not null - + price - + - + numeric(19, 2) not null - + domain_label - + - + text not null - + - + premiumlist_7c3ea68b - - + + public.PremiumList - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + creation_timestamp - + - + timestamptz - + name - + - + text not null - + bloom_filter - + - + bytea not null - + currency - + - + text not null - + - + premiumentry_b0060b91:w->premiumlist_7c3ea68b:e - - - - - - - - + + + + + + + + fko0gw90lpo1tuee56l0nb6y6g5 - + rderevision_83396864 - - + + public.RdeRevision - - + + [table] - + tld - + - + text not null - + mode - + - + text not null - + "date" - + - + date not null - + update_timestamp - + - + timestamptz - + revision - + - + int4 not null - + - + registrarpoc_ab47054d @@ -6133,574 +6275,574 @@ 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 - + lock_completion_time - + - + timestamptz - + lock_request_time - + - + timestamptz not null - + domain_name - + - + text not null - + is_superuser - + - + bool not null - + registrar_id - + - + text not null - + registrar_poc_id - + - + text - + repo_id - + - + text not null - + verification_code - + - + text not null - + unlock_request_time - + - + timestamptz - + unlock_completion_time - + - + timestamptz - + last_update_time - + - + timestamptz not null - + relock_revision_id - + - + int8 - + relock_duration - + - + interval - + - + registrylock_ac88663e:w->registrylock_ac88663e:e - - - - - - - - + + + + + + + + fk2lhcwpxlnqijr96irylrh1707 - + reservedentry_1a7b8520 - - + + public.ReservedEntry - - + + [table] - + revision_id - + - + int8 not null - + comment - + - + text - + reservation_type - + - + int4 not null - + domain_label - + - + text not null - + - + reservedlist_b97c3f1c - - + + public.ReservedList - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + creation_timestamp - + - + timestamptz not null - + name - + - + text not null - + should_publish - + - + bool not null - + - + reservedentry_1a7b8520:w->reservedlist_b97c3f1c:e - - - - - - - - + + + + + + + + fkgq03rk0bt1hb915dnyvd3vnfc - + serversecret_6cc90f09 - - + + public.ServerSecret - - + + [table] - + secret - + - + uuid not null - + id - + - + int8 not null - + - + signedmarkrevocationentry_99c39721 - - + + public.SignedMarkRevocationEntry - - + + [table] - + revision_id - + - + int8 not null - + revocation_time - + - + timestamptz not null - + smd_id - + - + text not null - + - + signedmarkrevocationlist_c5d968fb - - + + public.SignedMarkRevocationList - - + + [table] - + revision_id - + - + bigserial not null - + - + auto-incremented - + creation_time - + - + timestamptz - + - + signedmarkrevocationentry_99c39721:w->signedmarkrevocationlist_c5d968fb:e - - - - - - - - + + + + + + + + fk5ivlhvs3121yx2li5tqh54u4 - + spec11threatmatch_a61228a6 - - + + public.Spec11ThreatMatch - - + + [table] - + id - + - + bigserial not null - + - + auto-incremented - + check_date - + - + date not null - + domain_name - + - + text not null - + domain_repo_id - + - + text not null - + registrar_id - + - + text not null - + threat_types - + - + _text not null - + tld - + - + text not null - + - + tmchcrl_d282355 - - + + public.TmchCrl - - + + [table] - + certificate_revocations - + - + text not null - + update_timestamp - + - + timestamptz not null - + url - + - + text not null - + id - + - + int8 not null - + - + user_f2216f01 - - + + public."User" - - + + [table] - + id - + - + bigserial not null - + - + auto-incremented - + email_address - + - + text not null - + registry_lock_password_hash - + - + text - + registry_lock_password_salt - + - + text - + global_role - + - + text not null - + is_admin - + - + bool not null - + registrar_roles - + - + "hstore" not null - + update_timestamp - + - + timestamptz - + @@ -7750,6 +7892,256 @@ td.section {

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ public.BsaDomainInUse [table] +
labeltext not null
tldtext not null
creation_timetimestamptz not null
reasontext not null
Primary Key
BsaDomainInUse_pkey[primary key]
label
tld
Foreign Keys
fkbsadomaininuse2label[foreign key, on update no action, on delete cascade]
label (0..many)→ public.BsaLabel.label
Indexes
BsaDomainInUse_pkey[unique index]
labelascending
tldascending
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ public.BsaDownload [table] +
job_idbigserial not null
auto-incremented
block_list_checksumstext not null
creation_timetimestamptz not null
stagetext not null
update_timestamptimestamptz
Primary Key
BsaDownload_pkey[primary key]
job_id
Indexes
BsaDownload_pkey[unique index]
job_idascending
idxj874kw19bgdnkxo1rue45jwlw[non-unique index]
creation_timeascending
+

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ public.BsaLabel [table] +
labeltext not null
creation_timetimestamptz not null
Primary Key
BsaLabel_pkey[primary key]
label
Foreign Keys
fkbsadomaininuse2label[foreign key, on update no action, on delete cascade]
label ←(0..many) public.BsaDomainInUse.label
Indexes
BsaLabel_pkey[unique index]
labelascending
+

 

public.ClaimsEntry [table] diff --git a/db/src/main/resources/sql/flyway.txt b/db/src/main/resources/sql/flyway.txt index a3c868852..0ca126b6d 100644 --- a/db/src/main/resources/sql/flyway.txt +++ b/db/src/main/resources/sql/flyway.txt @@ -145,3 +145,5 @@ V144__drop_database_migration_state_schedule_table.sql V145__add_breakglass_mode_to_tld_table.sql V146__last_update_time_via_epp.sql V147__drop_gaia_id_from_user.sql +V148__add_bsa_download_and_label_tables.sql +V149__add_bsa_domain_in_use_table.sql diff --git a/db/src/main/resources/sql/flyway/V148__add_bsa_download_and_label_tables.sql b/db/src/main/resources/sql/flyway/V148__add_bsa_download_and_label_tables.sql new file mode 100644 index 000000000..a8a01d9f1 --- /dev/null +++ b/db/src/main/resources/sql/flyway/V148__add_bsa_download_and_label_tables.sql @@ -0,0 +1,30 @@ +-- Copyright 2023 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 "BsaDownload" ( + job_id bigserial not null, + block_list_checksums text not null, + creation_time timestamptz not null, + stage text not null, + update_timestamp timestamptz, + primary key (job_id) +); + +CREATE TABLE "BsaLabel" ( + label text not null, + creation_time timestamptz not null, + primary key (label) +); + +CREATE INDEX IDXj874kw19bgdnkxo1rue45jwlw on "BsaDownload" (creation_time); diff --git a/db/src/main/resources/sql/flyway/V149__add_bsa_domain_in_use_table.sql b/db/src/main/resources/sql/flyway/V149__add_bsa_domain_in_use_table.sql new file mode 100644 index 000000000..a954c62c4 --- /dev/null +++ b/db/src/main/resources/sql/flyway/V149__add_bsa_domain_in_use_table.sql @@ -0,0 +1,27 @@ +-- Copyright 2023 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 "BsaDomainInUse" ( + label text not null, + tld text not null, + creation_time timestamptz not null, + reason text not null, + primary key (label, tld) +); + +ALTER TABLE IF EXISTS "BsaDomainInUse" + ADD CONSTRAINT FKbsadomaininuse2label + FOREIGN KEY (label) + REFERENCES "BsaLabel" (label) + ON DELETE CASCADE; diff --git a/db/src/main/resources/sql/schema/nomulus.golden.sql b/db/src/main/resources/sql/schema/nomulus.golden.sql index 01c772ac5..ccfd78612 100644 --- a/db/src/main/resources/sql/schema/nomulus.golden.sql +++ b/db/src/main/resources/sql/schema/nomulus.golden.sql @@ -123,6 +123,60 @@ CREATE TABLE public."BillingRecurrence" ( ); +-- +-- Name: BsaDomainInUse; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public."BsaDomainInUse" ( + label text NOT NULL, + tld text NOT NULL, + creation_time timestamp with time zone NOT NULL, + reason text NOT NULL +); + + +-- +-- Name: BsaDownload; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public."BsaDownload" ( + job_id bigint NOT NULL, + block_list_checksums text NOT NULL, + creation_time timestamp with time zone NOT NULL, + stage text NOT NULL, + update_timestamp timestamp with time zone +); + + +-- +-- Name: BsaDownload_job_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE public."BsaDownload_job_id_seq" + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: BsaDownload_job_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE public."BsaDownload_job_id_seq" OWNED BY public."BsaDownload".job_id; + + +-- +-- Name: BsaLabel; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public."BsaLabel" ( + label text NOT NULL, + creation_time timestamp with time zone NOT NULL +); + + -- -- Name: ClaimsEntry; Type: TABLE; Schema: public; Owner: - -- @@ -1155,6 +1209,13 @@ CREATE SEQUENCE public.project_wide_unique_id_seq CACHE 10; +-- +-- Name: BsaDownload job_id; Type: DEFAULT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."BsaDownload" ALTER COLUMN job_id SET DEFAULT nextval('public."BsaDownload_job_id_seq"'::regclass); + + -- -- Name: ClaimsList revision_id; Type: DEFAULT; Schema: public; Owner: - -- @@ -1257,6 +1318,30 @@ ALTER TABLE ONLY public."BillingRecurrence" ADD CONSTRAINT "BillingRecurrence_pkey" PRIMARY KEY (billing_recurrence_id); +-- +-- Name: BsaDomainInUse BsaDomainInUse_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."BsaDomainInUse" + ADD CONSTRAINT "BsaDomainInUse_pkey" PRIMARY KEY (label, tld); + + +-- +-- Name: BsaDownload BsaDownload_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."BsaDownload" + ADD CONSTRAINT "BsaDownload_pkey" PRIMARY KEY (job_id); + + +-- +-- Name: BsaLabel BsaLabel_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."BsaLabel" + ADD CONSTRAINT "BsaLabel_pkey" PRIMARY KEY (label); + + -- -- Name: ClaimsEntry ClaimsEntry_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -1847,6 +1932,13 @@ CREATE INDEX idxj1mtx98ndgbtb1bkekahms18w ON public."GracePeriod" USING btree (d CREATE INDEX idxj77pfwhui9f0i7wjq6lmibovj ON public."HostHistory" USING btree (host_name); +-- +-- Name: idxj874kw19bgdnkxo1rue45jwlw; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX idxj874kw19bgdnkxo1rue45jwlw ON public."BsaDownload" USING btree (creation_time); + + -- -- Name: idxjny8wuot75b5e6p38r47wdawu; Type: INDEX; Schema: public; Owner: - -- @@ -2622,6 +2714,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; +-- +-- Name: BsaDomainInUse fkbsadomaininuse2label; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."BsaDomainInUse" + ADD CONSTRAINT fkbsadomaininuse2label FOREIGN KEY (label) REFERENCES public."BsaLabel"(label) ON DELETE CASCADE; + + -- -- Name: DomainTransactionRecord fkcjqe54u72kha71vkibvxhjye7; Type: FK CONSTRAINT; Schema: public; Owner: - -- diff --git a/dependencies.gradle b/dependencies.gradle index 99f035c4f..938490ee9 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -210,7 +210,7 @@ ext { 'org.apache.httpcomponents:httpcore:[4.4.13,)', 'org.apache.tomcat:tomcat-annotations-api:[8.0.5,)', 'com.fasterxml.jackson.core:jackson-databind:[2.11.2,)', - 'org.flywaydb:flyway-core:[5.2.4,)', + 'org.flywaydb:flyway-core:[5.2.4,10.0)!!', 'org.glassfish.jaxb:jaxb-runtime:[2.3.0,)', 'org.hamcrest:hamcrest:[2.2,)', 'org.hamcrest:hamcrest-core:[2.2,)',