From aea98f4bc33d486b6fdf4f1e178df72fd22cfa4d Mon Sep 17 00:00:00 2001 From: sarahcaseybot Date: Fri, 19 Aug 2022 12:53:58 -0400 Subject: [PATCH] Flyway files for PackagePromotion table (#1746) * Include missing file * Fix merge conflicts * make package price non null --- .../sql/er_diagram/brief_er_diagram.html | 2043 ++++++------ .../sql/er_diagram/full_er_diagram.html | 2763 +++++++++-------- db/src/main/resources/sql/flyway.txt | 1 + .../flyway/V125__create_package_promotion.sql | 28 + .../resources/sql/schema/nomulus.golden.sql | 31 + 5 files changed, 2580 insertions(+), 2286 deletions(-) create mode 100644 db/src/main/resources/sql/flyway/V125__create_package_promotion.sql 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 99ef8565f..233a5ec6c 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-08-17 16:58:06.253891 + 2022-08-18 20:43:24.136129 last flyway file - V124__add_console_user.sql + V125__create_package_promotion.sql

 

 

- + SchemaCrawler_Diagram - + generated by @@ -284,7 +284,7 @@ td.section { generated on - 2022-08-17 16:58:06.253891 + 2022-08-18 20:43:24.136129 @@ -333,319 +333,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 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 @@ -683,9 +683,9 @@ td.section { billingevent_a57d1815:w->registrar_6e1503e3:e - - - + + + @@ -696,189 +696,189 @@ td.section { 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 - + current_package_token - + - + text - + domain_6c51cffa:w->allocationtoken_a08ccbef:e - - - + + + @@ -889,14 +889,14 @@ td.section { domain_6c51cffa:w->billingevent_a57d1815:e - - - - - - - - + + + + + + + + fk_domain_transfer_billing_event_id @@ -978,9 +978,9 @@ td.section { domain_6c51cffa:w->billingcancellation_6eedf614:e - - - + + + @@ -991,27 +991,27 @@ 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 @@ -1109,61 +1109,61 @@ td.section { 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 - - - + + + @@ -1174,9 +1174,9 @@ td.section { domain_6c51cffa:w->registrar_6e1503e3:e - - - + + + @@ -1187,9 +1187,9 @@ td.section { domain_6c51cffa:w->registrar_6e1503e3:e - - - + + + @@ -1200,9 +1200,9 @@ td.section { domain_6c51cffa:w->registrar_6e1503e3:e - - - + + + @@ -1213,9 +1213,9 @@ td.section { domain_6c51cffa:w->registrar_6e1503e3:e - - - + + + @@ -1224,7 +1224,7 @@ td.section { fk_domain_transfer_losing_registrar_id - + tld_f1fa57e2 @@ -1246,105 +1246,105 @@ td.section { domain_6c51cffa:w->tld_f1fa57e2:e - - - + + + - + fk_domain_tld 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->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_billing_cancellation_billing_recurrence_id @@ -1363,210 +1363,210 @@ 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 - - + + [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 @@ -1637,87 +1637,87 @@ td.section { 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 @@ -1823,175 +1823,175 @@ 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->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 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 @@ -2092,153 +2092,153 @@ 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 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 - + - + int4 not null - + digest - + - + bytea not null - + digest_type - + - + int4 not null - + delegationsignerdata_e542a872:w->domain_6c51cffa:e - - - - - - - - + + + + + + + + fktr24j9v14ph2mfuw2gsmt12kq @@ -2272,48 +2272,48 @@ 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 - - - + + + @@ -2324,9 +2324,9 @@ td.section { host_f21b78de:w->registrar_6e1503e3:e - - - + + + @@ -2337,456 +2337,484 @@ td.section { 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 - + - + 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->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 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 + packagepromotion_56aa33 + + + public.PackagePromotion - - + + [table] - - revision_id + + package_promotion_id - + - + int8 not null - - domain_label + + token - + - + text not null - - + + - premiumlist_7c3ea68b - - - public.PremiumList + premiumentry_b0060b91 + + + public.PremiumEntry - - + + [table] - + revision_id - + - - bigserial not null + + int8 not null - + + domain_label - - auto-incremented + - - name - - - - + 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 @@ -2835,340 +2863,340 @@ 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 - + - + int8 not null - + email_address - + - + text not null - + gaia_id - + - + text not null - + @@ -5699,6 +5727,41 @@ td.section {

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
public.PackagePromotion [table] +
package_promotion_idint8 not null
tokentext not null
Primary Key
PackagePromotion_pkey[primary key]
package_promotion_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 269581d7e..c4e67cce4 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,32 +261,32 @@ td.section { - + - +
public.PollMessage [table]
generated on2022-08-17 16:58:04.286412022-08-18 20:43:22.295287
last flyway fileV124__add_console_user.sqlV125__create_package_promotion.sql

 

 

- + SchemaCrawler_Diagram - - + + generated by - + SchemaCrawler 16.10.1 - + generated on - - 2022-08-17 16:58:04.28641 + + 2022-08-18 20:43:22.295287 - + allocationtoken_a08ccbef @@ -1114,14 +1114,14 @@ td.section { billingevent_a57d1815:w->domainhistory_a54cc226:e - - - + + + - - - + + + fk_billing_event_domain_history @@ -1140,25 +1140,25 @@ td.section { billingevent_a57d1815:w->domainhistory_a54cc226:e - - - - + + + + - + - + fk_billing_event_recurrence_history billingevent_a57d1815:w->domainhistory_a54cc226:e - - - - + + + + - + fk_billing_event_recurrence_history @@ -1166,142 +1166,142 @@ td.section { 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 @@ -2271,26 +2271,26 @@ 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 @@ -2773,40 +2773,40 @@ td.section { 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 @@ -2851,25 +2851,25 @@ td.section { domain_6c51cffa:w->registrar_6e1503e3:e - - + + - + fkjc0r9r5y1lfbt4gpbqw4wsuvq domain_6c51cffa:w->registrar_6e1503e3:e - + - + - + fk_domain_transfer_gaining_registrar_id @@ -2877,18 +2877,18 @@ td.section { domain_6c51cffa:w->registrar_6e1503e3:e - + - - - - - + + + + + fk_domain_transfer_losing_registrar_id - + tld_f1fa57e2 @@ -3219,14 +3219,14 @@ td.section { domainhistory_a54cc226:w->allocationtoken_a08ccbef:e - - - - - - - - + + + + + + + + fk_domain_history_current_package_token @@ -3245,14 +3245,14 @@ td.section { domainhistory_a54cc226:w->registrar_6e1503e3:e - + - + fk_domain_history_registrar_id @@ -3271,14 +3271,14 @@ td.section { billingcancellation_6eedf614:w->domainhistory_a54cc226:e - + - + fk_billing_cancellation_domain_history @@ -3297,14 +3297,14 @@ td.section { billingcancellation_6eedf614:w->billingrecurrence_5fa2cb01:e - - - - - - - - + + + + + + + + fk_billing_cancellation_billing_recurrence_id @@ -3404,7 +3404,7 @@ td.section { graceperiod_cd3b2e8f:w->domain_6c51cffa:e - + @@ -3417,48 +3417,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 - - - + + + @@ -3469,104 +3469,104 @@ td.section { billingrecurrence_5fa2cb01:w->registrar_6e1503e3:e - - - - + + + + - - - + + + fk_billing_recurrence_registrar_id 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 @@ -3611,845 +3611,845 @@ td.section { 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_by_superuser - + - + bool not null - + history_registrar_id - + - + text - + history_modification_time - + - + timestamptz not null - + history_reason - + - + text - + history_requested_by_registrar - + - + bool - + history_client_transaction_id - + - + text - + history_server_transaction_id - + - + text - + history_type - + - + text not null - + history_xml_bytes - + - + bytea - + auth_info_repo_id - + - + text - + auth_info_value - + - + text - + contact_id - + - + text - + disclose_types_addr - + - + _text - + disclose_show_email - + - + bool - + disclose_show_fax - + - + bool - + disclose_mode_flag - + - + bool - + disclose_types_name - + - + _text - + disclose_types_org - + - + _text - + disclose_show_voice - + - + bool - + email - + - + text - + fax_phone_extension - + - + text - + fax_phone_number - + - + text - + addr_i18n_city - + - + text - + addr_i18n_country_code - + - + text - + addr_i18n_state - + - + text - + addr_i18n_street_line1 - + - + text - + addr_i18n_street_line2 - + - + text - + addr_i18n_street_line3 - + - + text - + addr_i18n_zip - + - + text - + addr_i18n_name - + - + text - + addr_i18n_org - + - + text - + addr_i18n_type - + - + text - + last_transfer_time - + - + timestamptz - + addr_local_city - + - + text - + addr_local_country_code - + - + text - + addr_local_state - + - + text - + addr_local_street_line1 - + - + text - + addr_local_street_line2 - + - + text - + addr_local_street_line3 - + - + text - + addr_local_zip - + - + text - + addr_local_name - + - + text - + addr_local_org - + - + text - + addr_local_type - + - + text - + search_name - + - + text - + transfer_poll_message_id_1 - + - + int8 - + transfer_poll_message_id_2 - + - + int8 - + transfer_client_txn_id - + - + text - + transfer_server_txn_id - + - + text - + transfer_gaining_registrar_id - + - + text - + transfer_losing_registrar_id - + - + text - + transfer_pending_expiration_time - + - + timestamptz - + transfer_request_time - + - + timestamptz - + transfer_status - + - + text - + voice_phone_extension - + - + text - + voice_phone_number - + - + text - + creation_registrar_id - + - + text - + creation_time - + - + timestamptz - + current_sponsor_registrar_id - + - + text - + deletion_time - + - + timestamptz - + last_epp_update_registrar_id - + - + text - + last_epp_update_time - + - + timestamptz - + statuses - + - + _text - + contact_repo_id - + - + text not null - + update_timestamp - + - + timestamptz - + transfer_history_entry_id - + - + int8 - + transfer_repo_id - + - + text - + transfer_poll_message_id_3 - + - + int8 - + 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] - + type - + - + text not null - + poll_message_id - + - + int8 not null - + registrar_id - + - + text not null - + contact_repo_id - + - + text - + contact_history_revision_id - + - + int8 - + domain_repo_id - + - + text - + domain_history_revision_id - + - + int8 - + event_time - + - + timestamptz not null - + host_repo_id - + - + text - + host_history_revision_id - + - + int8 - + message - + - + text - + transfer_response_contact_id - + - + text - + transfer_response_domain_expiration_time - + - + timestamptz - + transfer_response_domain_name - + - + text - + pending_action_response_action_result - + - + bool - + pending_action_response_name_or_id - + - + text - + pending_action_response_processed_date - + - + timestamptz - + pending_action_response_client_txn_id - + - + text - + pending_action_response_server_txn_id - + - + text - + transfer_response_gaining_registrar_id - + - + text - + transfer_response_losing_registrar_id - + - + text - + transfer_response_pending_transfer_expiration_time - + - + timestamptz - + transfer_response_transfer_request_time - + - + timestamptz - + transfer_response_transfer_status - + - + text - + autorenew_end_time - + - + timestamptz - + autorenew_domain_name - + - + text - + transfer_response_host_id - + - + text - + pollmessage_614a523e:w->domain_6c51cffa:e - - - + + + @@ -4460,9 +4460,9 @@ td.section { pollmessage_614a523e:w->domainhistory_a54cc226:e - - - + + + @@ -4473,9 +4473,9 @@ td.section { pollmessage_614a523e:w->domainhistory_a54cc226:e - - - + + + @@ -4486,444 +4486,444 @@ td.section { 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 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 - + last_epp_update_time - + - + timestamptz - + statuses - + - + _text - + host_name - + - + text - + last_superordinate_change - + - + timestamptz - + last_transfer_time - + - + timestamptz - + superordinate_domain - + - + text - + inet_addresses - + - + _text - + update_timestamp - + - + timestamptz - + transfer_poll_message_id_3 - + - + int8 - + pollmessage_614a523e:w->host_f21b78de:e - - - - - - - - + + + + + + + + fk_poll_message_host_repo_id hosthistory_56210c2 - - + + public.HostHistory - - + + [table] - + history_revision_id - + - + int8 not null - + history_by_superuser - + - + bool not null - + history_registrar_id - + - + text not null - + history_modification_time - + - + timestamptz not null - + history_reason - + - + text - + history_requested_by_registrar - + - + bool - + history_client_transaction_id - + - + text - + history_server_transaction_id - + - + text - + history_type - + - + text not null - + history_xml_bytes - + - + bytea - + host_name - + - + text - + inet_addresses - + - + _text - + last_superordinate_change - + - + timestamptz - + last_transfer_time - + - + timestamptz - + superordinate_domain - + - + text - + creation_registrar_id - + - + text - + creation_time - + - + timestamptz - + current_sponsor_registrar_id - + - + text - + deletion_time - + - + timestamptz - + last_epp_update_registrar_id - + - + text - + last_epp_update_time - + - + timestamptz - + statuses - + - + _text - + host_repo_id - + - + text not null - + update_timestamp - + - + timestamptz - + transfer_poll_message_id_3 - + - + int8 - + 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 - - - + + + @@ -4934,9 +4934,9 @@ td.section { pollmessage_614a523e:w->registrar_6e1503e3:e - - - + + + @@ -4947,174 +4947,174 @@ td.section { cursor_6af40e8c - - + + public."Cursor" - - + + [table] - + "scope" - + - + text not null - + type - + - + text not null - + cursor_time - + - + timestamptz not null - + last_update_time - + - + timestamptz not null - + databasemigrationstateschedule_22edefab - - + + public.DatabaseMigrationStateSchedule - - + + [table] - + id - + - + int8 not null - + migration_transitions - + - + "hstore" - + 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 domainhost_1ea127c2 - - + + public.DomainHost - - + + [table] - + domain_repo_id - + - + text not null - + host_repo_id - + - + text - + domainhost_1ea127c2:w->domain_6c51cffa:e - - - + + + @@ -5125,35 +5125,35 @@ td.section { 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 - - - + + + @@ -5164,9 +5164,9 @@ td.section { host_f21b78de:w->registrar_6e1503e3:e - - - + + + @@ -5177,9 +5177,9 @@ td.section { host_f21b78de:w->registrar_6e1503e3:e - - - + + + @@ -5190,157 +5190,157 @@ td.section { 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 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 @@ -5419,14 +5419,14 @@ td.section { domaintransactionrecord_6e77ff61:w->domainhistory_a54cc226:e - + - + - + fkcjqe54u72kha71vkibvxhjye7 @@ -5458,132 +5458,132 @@ td.section { 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 hosthistory_56210c2:w->host_f21b78de:e - - - - - - - - + + + + + + + + fk_hosthistory_host hosthistory_56210c2:w->registrar_6e1503e3:e - - - + + + @@ -5594,215 +5594,291 @@ td.section { lock_f21d4861 - - + + public.Lock - - + + [table] - + resource_name - + - + text not null - + "scope" - + - + text not null - + acquired_time - + - + timestamptz not null - + expiration_time - + - + timestamptz not null - + request_log_id - + - + text not null - - + + - premiumentry_b0060b91 - - - public.PremiumEntry + packagepromotion_56aa33 + + + public.PackagePromotion - - + + [table] - - revision_id + + package_promotion_id - + - + int8 not null - - price + + last_notification_sent - + - - 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 - + + 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 @@ -5939,556 +6015,556 @@ td.section { 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 - + - + int8 not null - + email_address - + - + text not null - + gaia_id - + - + 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 - + @@ -11681,6 +11757,101 @@ td.section {

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
public.PackagePromotion [table] +
package_promotion_idint8 not null
last_notification_senttimestamptz
max_createsint4 not null
max_domainsint4 not null
next_billing_datetimestamptz not null
package_price_amountnumeric(19, 2) not null
package_price_currencytext not null
tokentext not null
Primary Key
PackagePromotion_pkey[primary key]
package_promotion_id
Indexes
PackagePromotion_pkey[unique index]
package_promotion_idascending
idxlg6a5tp70nch9cp0gc11brc5o[non-unique index]
tokenascending
+

 

diff --git a/db/src/main/resources/sql/flyway.txt b/db/src/main/resources/sql/flyway.txt index bf897ad7b..5b868b3c2 100644 --- a/db/src/main/resources/sql/flyway.txt +++ b/db/src/main/resources/sql/flyway.txt @@ -122,3 +122,4 @@ V121__drop_sql_checkpoint_and_txn.sql V122__add_current_package_token_to_domain.sql V123__drop_unused_columns_in_billing_cancellation_table.sql V124__add_console_user.sql +V125__create_package_promotion.sql diff --git a/db/src/main/resources/sql/flyway/V125__create_package_promotion.sql b/db/src/main/resources/sql/flyway/V125__create_package_promotion.sql new file mode 100644 index 000000000..f11e8fe80 --- /dev/null +++ b/db/src/main/resources/sql/flyway/V125__create_package_promotion.sql @@ -0,0 +1,28 @@ +-- 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 table "PackagePromotion" ( + package_promotion_id int8 not null, + 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, + primary key (package_promotion_id) + ); + +create index IDXlg6a5tp70nch9cp0gc11brc5o on "PackagePromotion" (token); + diff --git a/db/src/main/resources/sql/schema/nomulus.golden.sql b/db/src/main/resources/sql/schema/nomulus.golden.sql index 1c31971d0..ef0019527 100644 --- a/db/src/main/resources/sql/schema/nomulus.golden.sql +++ b/db/src/main/resources/sql/schema/nomulus.golden.sql @@ -646,6 +646,22 @@ CREATE TABLE public."Lock" ( ); +-- +-- Name: PackagePromotion; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public."PackagePromotion" ( + package_promotion_id bigint NOT NULL, + last_notification_sent timestamp with time zone, + max_creates integer NOT NULL, + max_domains integer NOT NULL, + next_billing_date timestamp with time zone NOT NULL, + package_price_amount numeric(19,2) NOT NULL, + package_price_currency text NOT NULL, + token text NOT NULL +); + + -- -- Name: PollMessage; Type: TABLE; Schema: public; Owner: - -- @@ -1264,6 +1280,14 @@ ALTER TABLE ONLY public."Lock" ADD CONSTRAINT "Lock_pkey" PRIMARY KEY (resource_name, scope); +-- +-- Name: PackagePromotion PackagePromotion_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."PackagePromotion" + ADD CONSTRAINT "PackagePromotion_pkey" PRIMARY KEY (package_promotion_id); + + -- -- Name: PollMessage PollMessage_pkey; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -1766,6 +1790,13 @@ CREATE INDEX idxl49vydnq0h5j1piefwjy4i8er ON public."Host" USING btree (current_ CREATE INDEX idxl8vobbecsd32k4ksavdfx8st6 ON public."BillingCancellation" USING btree (domain_repo_id); +-- +-- Name: idxlg6a5tp70nch9cp0gc11brc5o; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX idxlg6a5tp70nch9cp0gc11brc5o ON public."PackagePromotion" USING btree (token); + + -- -- Name: idxlrq7v63pc21uoh3auq6eybyhl; Type: INDEX; Schema: public; Owner: - --
public.PollMessage [table]