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 856111365..519144e3f 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,26 +261,26 @@ td.section { generated on - 2025-04-18 20:02:20 + 2025-04-30 16:04:48 last flyway file - V192__add_last_poc_verification_date.sql + V193__password_reset_request.sql

 

 

- - + + SchemaCrawler_Diagram - + generated by SchemaCrawler 16.25.2 generated on - 2025-04-18 20:02:20 + 2025-04-30 16:04:48 @@ -404,7 +404,7 @@ td.section { fk_billing_event_cancellation_matching_billing_recurrence_id - + registrar_6e1503e3 @@ -765,7 +765,7 @@ td.section { fk_domain_transfer_losing_registrar_id - + tld_f1fa57e2 @@ -1153,7 +1153,7 @@ td.section { text not null - + user_f2216f01 @@ -1900,74 +1900,87 @@ td.section { text not null - + + + passwordresetrequest_8484e7b1 + + + public."PasswordResetRequest" + + [table] + verification_code + + text not null + + + premiumentry_b0060b91 - - public."PremiumEntry" - - [table] - revision_id - - int8 not null - domain_label - - text not null - + + 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 - + + public."PremiumList" + + [table] + revision_id + + bigserial not null + + auto-incremented + name + + text not null + premiumentry_b0060b91:w->premiumlist_7c3ea68b:e - - - - - - - - fko0gw90lpo1tuee56l0nb6y6g5 + + + + + + + + fko0gw90lpo1tuee56l0nb6y6g5 - + rderevision_83396864 - - public."RdeRevision" - - [table] - tld - - text not null - mode - - text not null - "date" - - date not null - + + public."RdeRevision" + + [table] + tld + + text not null + mode + + text not null + "date" + + date not null + - + registrarpoc_ab47054d @@ -1996,7 +2009,7 @@ td.section { fk_registrar_poc_registrar_id - + registrarupdatehistory_8a38bed4 @@ -2028,7 +2041,7 @@ td.section { fkregistrarupdatehistoryregistrarid - + registrarpocupdatehistory_31e5d9aa @@ -2076,205 +2089,205 @@ td.section { fkregistrarpocupdatehistoryemailaddress - + 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 - + + 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 + + + + + + + + fk2lhcwpxlnqijr96irylrh1707 - + reservedentry_1a7b8520 - - public."ReservedEntry" - - [table] - revision_id - - int8 not null - domain_label - - text not null - + + 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 - + + public."ReservedList" + + [table] + revision_id + + bigserial not null + + auto-incremented + name + + text not null + reservedentry_1a7b8520:w->reservedlist_b97c3f1c:e - - - - - - - - fkgq03rk0bt1hb915dnyvd3vnfc + + + + + + + + fkgq03rk0bt1hb915dnyvd3vnfc - + serversecret_6cc90f09 - - public."ServerSecret" - - [table] - id - - int8 not null - + + public."ServerSecret" + + [table] + id + + int8 not null + - + signedmarkrevocationentry_99c39721 - - public."SignedMarkRevocationEntry" - - [table] - revision_id - - int8 not null - smd_id - - text not null - + + 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 - + + public."SignedMarkRevocationList" + + [table] + revision_id + + bigserial not null + + auto-incremented + signedmarkrevocationentry_99c39721:w->signedmarkrevocationlist_c5d968fb:e - - - - - - - - fk5ivlhvs3121yx2li5tqh54u4 + + + + + + + + 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 - + + 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 - + + public."TmchCrl" + + [table] + id + + int8 not null + - + userupdatehistory_24efd476 - - public."UserUpdateHistory" - - [table] - history_revision_id - - int8 not null - email_address - - text not null - history_acting_user - - text not null - + + public."UserUpdateHistory" + + [table] + history_revision_id + + int8 not null + email_address + + text not null + history_acting_user + + text not null + @@ -4982,6 +4995,37 @@ td.section {

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ public."PasswordResetRequest" [table] +
verification_codetext not null
Primary Key
"PasswordResetRequest_pkey"[primary key]
verification_code
+

 

- + - +
public."PollMessage" [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 9799bd04c..3edced833 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,26 +261,26 @@ td.section {
generated on2025-04-18 20:02:172025-04-30 16:04:45
last flyway fileV192__add_last_poc_verification_date.sqlV193__password_reset_request.sql

 

 

- - + + SchemaCrawler_Diagram - + generated by SchemaCrawler 16.25.2 generated on - 2025-04-18 20:02:17 + 2025-04-30 16:04:45 @@ -488,7 +488,7 @@ td.section { fk_billing_event_cancellation_matching_billing_recurrence_id - + registrar_6e1503e3 @@ -1233,7 +1233,7 @@ td.section { fk_domain_transfer_losing_registrar_id - + tld_f1fa57e2 @@ -1999,7 +1999,7 @@ td.section { text not null - + user_f2216f01 @@ -3163,92 +3163,120 @@ td.section { text not null - + + + passwordresetrequest_8484e7b1 + + + public."PasswordResetRequest" + + [table] + type + + text not null + request_time + + timestamptz not null + requester + + text not null + fulfillment_time + + timestamptz + destination_email + + text not null + verification_code + + text not null + + + premiumentry_b0060b91 - - public."PremiumEntry" - - [table] - revision_id - - int8 not null - price - - numeric(19, 2) not null - domain_label - - text not null - + + 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 - + + 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 + + + + + + + + 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 - + + public."RdeRevision" + + [table] + tld + + text not null + mode + + text not null + "date" + + date not null + update_timestamp + + timestamptz + revision + + int4 not null + - + registrarpoc_ab47054d @@ -3310,7 +3338,7 @@ td.section { fk_registrar_poc_registrar_id - + registrarupdatehistory_8a38bed4 @@ -3492,7 +3520,7 @@ td.section { fkregistrarupdatehistoryregistrarid - + registrarpocupdatehistory_31e5d9aa @@ -3591,304 +3619,304 @@ td.section { fkregistrarpocupdatehistoryemailaddress - + 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 - + + 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 + + + + + + + + fk2lhcwpxlnqijr96irylrh1707 - + reservedentry_1a7b8520 - - public."ReservedEntry" - - [table] - revision_id - - int8 not null - comment - - text - reservation_type - - int4 not null - domain_label - - text not null - + + 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 - + + public."ReservedList" + + [table] + revision_id + + bigserial not null + + auto-incremented + creation_timestamp + + timestamptz not null + name + + text not null + reservedentry_1a7b8520:w->reservedlist_b97c3f1c:e - - - - - - - - fkgq03rk0bt1hb915dnyvd3vnfc + + + + + + + + fkgq03rk0bt1hb915dnyvd3vnfc - + serversecret_6cc90f09 - - public."ServerSecret" - - [table] - secret - - uuid not null - id - - int8 not null - + + 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 - + + 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 - + + public."SignedMarkRevocationList" + + [table] + revision_id + + bigserial not null + + auto-incremented + creation_time + + timestamptz + signedmarkrevocationentry_99c39721:w->signedmarkrevocationlist_c5d968fb:e - - - - - - - - fk5ivlhvs3121yx2li5tqh54u4 + + + + + + + + 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 - + + 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 - + + public."TmchCrl" + + [table] + certificate_revocations + + text not null + update_timestamp + + timestamptz not null + url + + text not null + id + + int8 not null + - + userupdatehistory_24efd476 - - public."UserUpdateHistory" - - [table] - history_revision_id - - int8 not null - history_modification_time - - timestamptz not null - history_method - - text not null - history_request_body - - text - history_type - - text not null - history_url - - text not null - 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 - update_timestamp - - timestamptz - history_acting_user - - text not null - registry_lock_email_address - - text - + + public."UserUpdateHistory" + + [table] + history_revision_id + + int8 not null + history_modification_time + + timestamptz not null + history_method + + text not null + history_request_body + + text + history_type + + text not null + history_url + + text not null + 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 + update_timestamp + + timestamptz + history_acting_user + + text not null + registry_lock_email_address + + text + @@ -9870,6 +9898,80 @@ td.section {

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ public."PasswordResetRequest" [table] +
typetext not null
request_timetimestamptz not null
requestertext not null
fulfillment_timetimestamptz
destination_emailtext not null
verification_codetext not null
Primary Key
"PasswordResetRequest_pkey"[primary key]
verification_code
Indexes
"PasswordResetRequest_pkey"[unique index]
verification_codeascending
+

 

public."PollMessage" [table] diff --git a/db/src/main/resources/sql/flyway.txt b/db/src/main/resources/sql/flyway.txt index 7a24901bb..92c8eb0c7 100644 --- a/db/src/main/resources/sql/flyway.txt +++ b/db/src/main/resources/sql/flyway.txt @@ -190,3 +190,4 @@ V189__remove_fk_consoleeppactionhistory.sql V190__remove_fk_registrarupdatehistory.sql V191__remove_fk_registrarpocupdatehistory.sql V192__add_last_poc_verification_date.sql +V193__password_reset_request.sql diff --git a/db/src/main/resources/sql/flyway/V193__password_reset_request.sql b/db/src/main/resources/sql/flyway/V193__password_reset_request.sql new file mode 100644 index 000000000..737df821a --- /dev/null +++ b/db/src/main/resources/sql/flyway/V193__password_reset_request.sql @@ -0,0 +1,23 @@ +-- Copyright 2025 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 "PasswordResetRequest" ( + type text NOT NULL, + request_time timestamptz NOT NULL, + requester text NOT NULL, + fulfillment_time timestamptz, + destination_email text NOT NULL, + verification_code text NOT NULL, + PRIMARY KEY (verification_code) +); diff --git a/db/src/main/resources/sql/schema/nomulus.golden.sql b/db/src/main/resources/sql/schema/nomulus.golden.sql index 6dff607ea..f8962b232 100644 --- a/db/src/main/resources/sql/schema/nomulus.golden.sql +++ b/db/src/main/resources/sql/schema/nomulus.golden.sql @@ -842,6 +842,20 @@ CREATE SEQUENCE public."Package_promotion_id_seq" ALTER SEQUENCE public."Package_promotion_id_seq" OWNED BY public."PackagePromotion".package_promotion_id; +-- +-- Name: PasswordResetRequest; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public."PasswordResetRequest" ( + type text NOT NULL, + request_time timestamp with time zone NOT NULL, + requester text NOT NULL, + fulfillment_time timestamp with time zone, + destination_email text NOT NULL, + verification_code text NOT NULL +); + + -- -- Name: PollMessage; Type: TABLE; Schema: public; Owner: - -- @@ -1682,6 +1696,14 @@ ALTER TABLE ONLY public."PackagePromotion" ADD CONSTRAINT "PackagePromotion_pkey" PRIMARY KEY (package_promotion_id); +-- +-- Name: PasswordResetRequest PasswordResetRequest_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."PasswordResetRequest" + ADD CONSTRAINT "PasswordResetRequest_pkey" PRIMARY KEY (verification_code); + + -- -- Name: PollMessage PollMessage_pkey; Type: CONSTRAINT; Schema: public; Owner: - --