Add lastUpdateTime column to epp resources (#683)

* Add lastUpdateTime column to epp resources

Property was inadvertently left out.

Renamed getter and setter to match the property name.

Added a test helper to compare EppResources while ignoring
lastUpdateTime, which changes every time an instance is persisted.
This commit is contained in:
Weimin Yu 2020-07-14 14:53:05 -04:00 committed by GitHub
parent 9649f49bce
commit 65c9cd3f4d
15 changed files with 218 additions and 54 deletions

View file

@ -0,0 +1,23 @@
-- Copyright 2020 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 "Contact" ADD COLUMN update_timestamp timestamptz;
ALTER TABLE "ContactHistory" ADD COLUMN update_timestamp timestamptz;
ALTER TABLE "Domain" ADD COLUMN update_timestamp timestamptz;
ALTER TABLE "HostHistory" ADD COLUMN update_timestamp timestamptz;
ALTER TABLE "HostResource" ADD COLUMN update_timestamp timestamptz;

View file

@ -77,6 +77,7 @@ create sequence history_id_sequence start 1 increment 1;
create table "Contact" (
repo_id text not null,
update_timestamp timestamptz,
creation_registrar_id text not null,
creation_time timestamptz not null,
current_sponsor_registrar_id text not null,
@ -197,6 +198,7 @@ create sequence history_id_sequence start 1 increment 1;
last_epp_update_registrar_id text,
last_epp_update_time timestamptz,
statuses text[],
update_timestamp timestamptz,
contact_repo_id text not null,
primary key (history_revision_id)
);
@ -219,6 +221,7 @@ create sequence history_id_sequence start 1 increment 1;
create table "Domain" (
repo_id text not null,
update_timestamp timestamptz,
creation_registrar_id text not null,
creation_time timestamptz not null,
current_sponsor_registrar_id text not null,
@ -300,12 +303,14 @@ create sequence history_id_sequence start 1 increment 1;
last_epp_update_registrar_id text,
last_epp_update_time timestamptz,
statuses text[],
update_timestamp timestamptz,
host_repo_id text not null,
primary key (history_revision_id)
);
create table "HostResource" (
repo_id text not null,
update_timestamp timestamptz,
creation_registrar_id text not null,
creation_time timestamptz not null,
current_sponsor_registrar_id text not null,

View file

@ -250,7 +250,8 @@ CREATE TABLE public."Contact" (
transfer_losing_registrar_id text,
transfer_pending_expiration_time timestamp with time zone,
transfer_request_time timestamp with time zone,
transfer_status text
transfer_status text,
update_timestamp timestamp with time zone
);
@ -334,7 +335,8 @@ CREATE TABLE public."ContactHistory" (
last_epp_update_registrar_id text,
last_epp_update_time timestamp with time zone,
statuses text[],
contact_repo_id text NOT NULL
contact_repo_id text NOT NULL,
update_timestamp timestamp with time zone
);
@ -395,7 +397,8 @@ CREATE TABLE public."Domain" (
transfer_losing_registrar_id text,
transfer_pending_expiration_time timestamp with time zone,
transfer_request_time timestamp with time zone,
transfer_status text
transfer_status text,
update_timestamp timestamp with time zone
);
@ -436,7 +439,8 @@ CREATE TABLE public."HostHistory" (
last_epp_update_registrar_id text,
last_epp_update_time timestamp with time zone,
statuses text[],
host_repo_id text NOT NULL
host_repo_id text NOT NULL,
update_timestamp timestamp with time zone
);
@ -457,7 +461,8 @@ CREATE TABLE public."HostResource" (
last_superordinate_change timestamp with time zone,
last_transfer_time timestamp with time zone,
superordinate_domain text,
inet_addresses text[]
inet_addresses text[],
update_timestamp timestamp with time zone
);