1
0
mirror of https://github.com/google/nomulus synced 2025-12-23 06:15:42 +00:00

Add and use new SimpleConsoleUpdateHistory table (#2712)

This changes the code to only save console histories of this type. We
keep the old Java code (and, necessarily, the corresponding SQL code)
for now because there's no harm in doing so and we want to avoid hastily
deleting too much.
This commit is contained in:
gbrodman
2025-03-21 10:46:16 -04:00
committed by GitHub
parent 04b30f5c04
commit ed33c7424d
26 changed files with 366 additions and 70 deletions

View File

@@ -261,7 +261,7 @@ td.section {
</tr>
<tr>
<td class="property_name">generated on</td>
<td class="property_value">2025-03-07 18:24:45</td>
<td class="property_value">2025-03-10 15:53:40</td>
</tr>
<tr>
<td class="property_name">last flyway file</td>
@@ -280,7 +280,7 @@ td.section {
<text text-anchor="start" x="4616" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated by</text>
<text text-anchor="start" x="4699" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">SchemaCrawler 16.25.2</text>
<text text-anchor="start" x="4615" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated on</text>
<text text-anchor="start" x="4699" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2025-03-07 18:24:45</text>
<text text-anchor="start" x="4699" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2025-03-10 15:53:40</text>
<polygon fill="none" stroke="#888888" points="4612,-4 4612,-44 4848,-44 4848,-4 4612,-4" /> <!-- allocationtoken_a08ccbef -->
<g id="node1" class="node">
<title>

View File

@@ -261,7 +261,7 @@ td.section {
</tr>
<tr>
<td class="property_name">generated on</td>
<td class="property_value">2025-03-07 18:24:42</td>
<td class="property_value">2025-03-10 15:53:36</td>
</tr>
<tr>
<td class="property_name">last flyway file</td>
@@ -280,7 +280,7 @@ td.section {
<text text-anchor="start" x="5321" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated by</text>
<text text-anchor="start" x="5404" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">SchemaCrawler 16.25.2</text>
<text text-anchor="start" x="5320" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">generated on</text>
<text text-anchor="start" x="5404" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2025-03-07 18:24:42</text>
<text text-anchor="start" x="5404" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">2025-03-10 15:53:36</text>
<polygon fill="none" stroke="#888888" points="5317,-4 5317,-44 5553,-44 5553,-4 5317,-4" /> <!-- allocationtoken_a08ccbef -->
<g id="node1" class="node">
<title>

View File

@@ -139,7 +139,7 @@
history_method text not null,
history_modification_time timestamp(6) with time zone not null,
history_request_body text,
history_type text not null check (history_type in ('EPP_ACTION','POC_CREATE','POC_UPDATE','POC_DELETE','REGISTRAR_UPDATE','USER_CREATE','USER_DELETE','USER_UPDATE')),
history_type text not null check (history_type in ('DOMAIN_DELETE','DOMAIN_SUSPEND','DOMAIN_UNSUSPEND','EPP_PASSWORD_UPDATE','REGISTRAR_CREATE','REGISTRAR_SECURITY_UPDATE','REGISTRAR_UPDATE','USER_CREATE','USER_DELETE','USER_UPDATE')),
history_url text not null,
history_entry_class text not null,
repo_id text not null,
@@ -148,6 +148,17 @@
primary key (history_revision_id)
);
create table "ConsoleUpdateHistory" (
revision_id bigint not null,
description text,
method text not null,
modification_time timestamp(6) with time zone not null,
type text not null check (type in ('DOMAIN_DELETE','DOMAIN_SUSPEND','DOMAIN_UNSUSPEND','EPP_PASSWORD_UPDATE','REGISTRAR_CREATE','REGISTRAR_SECURITY_UPDATE','REGISTRAR_UPDATE','USER_CREATE','USER_DELETE','USER_UPDATE')),
url text not null,
acting_user text not null,
primary key (revision_id)
);
create table "Contact" (
repo_id text not null,
update_timestamp timestamp(6) with time zone,
@@ -693,7 +704,7 @@
history_method text not null,
history_modification_time timestamp(6) with time zone not null,
history_request_body text,
history_type text not null check (history_type in ('EPP_ACTION','POC_CREATE','POC_UPDATE','POC_DELETE','REGISTRAR_UPDATE','USER_CREATE','USER_DELETE','USER_UPDATE')),
history_type text not null check (history_type in ('DOMAIN_DELETE','DOMAIN_SUSPEND','DOMAIN_UNSUSPEND','EPP_PASSWORD_UPDATE','REGISTRAR_CREATE','REGISTRAR_SECURITY_UPDATE','REGISTRAR_UPDATE','USER_CREATE','USER_DELETE','USER_UPDATE')),
history_url text not null,
email_address text not null,
registrar_id text not null,
@@ -717,7 +728,7 @@
history_method text not null,
history_modification_time timestamp(6) with time zone not null,
history_request_body text,
history_type text not null check (history_type in ('EPP_ACTION','POC_CREATE','POC_UPDATE','POC_DELETE','REGISTRAR_UPDATE','USER_CREATE','USER_DELETE','USER_UPDATE')),
history_type text not null check (history_type in ('DOMAIN_DELETE','DOMAIN_SUSPEND','DOMAIN_UNSUSPEND','EPP_PASSWORD_UPDATE','REGISTRAR_CREATE','REGISTRAR_SECURITY_UPDATE','REGISTRAR_UPDATE','USER_CREATE','USER_DELETE','USER_UPDATE')),
history_url text not null,
allowed_tlds text[],
billing_account_map hstore,
@@ -906,7 +917,7 @@
history_method text not null,
history_modification_time timestamp(6) with time zone not null,
history_request_body text,
history_type text not null check (history_type in ('EPP_ACTION','POC_CREATE','POC_UPDATE','POC_DELETE','REGISTRAR_UPDATE','USER_CREATE','USER_DELETE','USER_UPDATE')),
history_type text not null check (history_type in ('DOMAIN_DELETE','DOMAIN_SUSPEND','DOMAIN_UNSUSPEND','EPP_PASSWORD_UPDATE','REGISTRAR_CREATE','REGISTRAR_SECURITY_UPDATE','REGISTRAR_UPDATE','USER_CREATE','USER_DELETE','USER_UPDATE')),
history_url text not null,
email_address text not null,
registry_lock_email_address text,
@@ -1010,6 +1021,15 @@
create index IDXiahqo1d1fqdfknywmj2xbxl7t
on "ConsoleEppActionHistory" (revision_id);
create index idx_console_update_history_acting_user
on "ConsoleUpdateHistory" (acting_user);
create index idx_console_update_history_type
on "ConsoleUpdateHistory" (type);
create index idx_console_update_history_modification_time
on "ConsoleUpdateHistory" (modification_time);
create index IDX3y752kr9uh4kh6uig54vemx0l
on "Contact" (creation_time);
@@ -1228,6 +1248,11 @@
foreign key (history_acting_user)
references "User";
alter table if exists "ConsoleUpdateHistory"
add constraint FKnhl1eolgix64u90xv3pj6xa3x
foreign key (acting_user)
references "User";
alter table if exists "DelegationSignerData"
add constraint FKtr24j9v14ph2mfuw2gsmt12kq
foreign key (domain_repo_id)