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 6574bea6c..679afaabb 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,11 +261,11 @@ td.section { generated on - 2023-03-09 22:05:25.449957 + 2023-03-14 17:02:14.207181 last flyway file - V139__add_allowed_epp_actions_column.sql + V140__rename_process_time_column_in_dns_refresh_request_table.sql @@ -284,7 +284,7 @@ td.section { generated on - 2023-03-09 22:05:25.449957 + 2023-03-14 17:02:14.207181 @@ -2255,12 +2255,12 @@ td.section { id - + bigserial not null - + auto-incremented @@ -2268,15 +2268,15 @@ td.section { request_time - + timestamptz not null - process_time + last_process_time - + timestamptz not null @@ -4432,7 +4432,7 @@ td.section { - process_time + last_process_time timestamptz not null 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 d6a302fa0..37a1794a0 100644 --- a/db/src/main/resources/sql/er_diagram/full_er_diagram.html +++ b/db/src/main/resources/sql/er_diagram/full_er_diagram.html @@ -261,11 +261,11 @@ td.section { generated on - 2023-03-09 22:05:23.270136 + 2023-03-14 17:02:11.913219 last flyway file - V139__add_allowed_epp_actions_column.sql + V140__rename_process_time_column_in_dns_refresh_request_table.sql @@ -284,7 +284,7 @@ td.section { generated on - 2023-03-09 22:05:23.270136 + 2023-03-14 17:02:11.913219 @@ -5103,12 +5103,12 @@ td.section { id - + bigserial not null - + auto-incremented @@ -5116,7 +5116,7 @@ td.section { name - + text not null @@ -5124,7 +5124,7 @@ td.section { request_time - + timestamptz not null @@ -5132,7 +5132,7 @@ td.section { tld - + text not null @@ -5140,15 +5140,15 @@ td.section { type - + text not null - process_time + last_process_time - + timestamptz not null @@ -9199,7 +9199,7 @@ td.section { - process_time + last_process_time timestamptz not null @@ -9242,12 +9242,12 @@ td.section { - idx3i7i2ktts9d7lcjbs34h0pvwo + idxfdk2xpil2x1gh0omt84k2y3o1 [non-unique index] - process_time + last_process_time ascending diff --git a/db/src/main/resources/sql/flyway.txt b/db/src/main/resources/sql/flyway.txt index 3c3cce1e3..756e7e37b 100644 --- a/db/src/main/resources/sql/flyway.txt +++ b/db/src/main/resources/sql/flyway.txt @@ -137,3 +137,4 @@ V136__add_dns_refresh_request_table.sql V137__add_process_time_column.sql V138__drop_dns_refresh_request_time_column.sql V139__add_allowed_epp_actions_column.sql +V140__rename_process_time_column_in_dns_refresh_request_table.sql diff --git a/db/src/main/resources/sql/flyway/V140__rename_process_time_column_in_dns_refresh_request_table.sql b/db/src/main/resources/sql/flyway/V140__rename_process_time_column_in_dns_refresh_request_table.sql new file mode 100644 index 000000000..465261ec2 --- /dev/null +++ b/db/src/main/resources/sql/flyway/V140__rename_process_time_column_in_dns_refresh_request_table.sql @@ -0,0 +1,20 @@ +-- 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. + +ALTER TABLE "DnsRefreshRequest" RENAME COLUMN process_time TO last_process_time; +CREATE INDEX IDXfdk2xpil2x1gh0omt84k2y3o1 ON "DnsRefreshRequest" (last_process_time); +DROP INDEX IDX3i7i2ktts9d7lcjbs34h0pvwo; + + + diff --git a/db/src/main/resources/sql/schema/nomulus.golden.sql b/db/src/main/resources/sql/schema/nomulus.golden.sql index 80c7569c7..09132e3f6 100644 --- a/db/src/main/resources/sql/schema/nomulus.golden.sql +++ b/db/src/main/resources/sql/schema/nomulus.golden.sql @@ -351,7 +351,7 @@ CREATE TABLE public."DnsRefreshRequest" ( request_time timestamp with time zone NOT NULL, tld text NOT NULL, type text NOT NULL, - process_time timestamp with time zone NOT NULL + last_process_time timestamp with time zone NOT NULL ); @@ -1618,13 +1618,6 @@ CREATE INDEX idx1rcgkdd777bpvj0r94sltwd5y ON public."Domain" USING btree (domain CREATE INDEX idx2exdfbx6oiiwnhr8j6gjpqt2j ON public."BillingCancellation" USING btree (event_time); --- --- Name: idx3i7i2ktts9d7lcjbs34h0pvwo; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX idx3i7i2ktts9d7lcjbs34h0pvwo ON public."DnsRefreshRequest" USING btree (process_time); - - -- -- Name: idx3y3k7m2bkgahm9sixiohgyrga; Type: INDEX; Schema: public; Owner: - -- @@ -1821,6 +1814,13 @@ CREATE INDEX idxe7wu46c7wpvfmfnj4565abibp ON public."PollMessage" USING btree (r CREATE INDEX idxeokttmxtpq2hohcioe5t2242b ON public."BillingCancellation" USING btree (registrar_id); +-- +-- Name: idxfdk2xpil2x1gh0omt84k2y3o1; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX idxfdk2xpil2x1gh0omt84k2y3o1 ON public."DnsRefreshRequest" USING btree (last_process_time); + + -- -- Name: idxfg2nnjlujxo6cb9fha971bq2n; Type: INDEX; Schema: public; Owner: - --