mirror of
https://github.com/google/nomulus
synced 2026-10-01 04:05:49 +00:00
Use composite primary key for HostHistory and ContactHistory (#809)
* Use composite primary key for HostHistory and ContactHistory * Update flyway file version * Make getters private * Add javadoc * Rebase on HEAD
This commit is contained in:
@@ -151,7 +151,8 @@ create sequence temp_history_id_sequence start 1 increment 50;
|
||||
);
|
||||
|
||||
create table "ContactHistory" (
|
||||
history_revision_id int8 not null,
|
||||
contact_repo_id text not null,
|
||||
history_revision_id int8 not null,
|
||||
history_by_superuser boolean not null,
|
||||
history_registrar_id text,
|
||||
history_modification_time timestamptz not null,
|
||||
@@ -215,8 +216,7 @@ create sequence temp_history_id_sequence start 1 increment 50;
|
||||
last_epp_update_time timestamptz,
|
||||
statuses text[],
|
||||
update_timestamp timestamptz,
|
||||
contact_repo_id text not null,
|
||||
primary key (history_revision_id)
|
||||
primary key (contact_repo_id, history_revision_id)
|
||||
);
|
||||
|
||||
create table "Cursor" (
|
||||
@@ -400,7 +400,8 @@ create sequence temp_history_id_sequence start 1 increment 50;
|
||||
);
|
||||
|
||||
create table "HostHistory" (
|
||||
history_revision_id int8 not null,
|
||||
host_repo_id text not null,
|
||||
history_revision_id int8 not null,
|
||||
history_by_superuser boolean not null,
|
||||
history_registrar_id text,
|
||||
history_modification_time timestamptz not null,
|
||||
@@ -423,8 +424,7 @@ create sequence temp_history_id_sequence start 1 increment 50;
|
||||
last_epp_update_time timestamptz,
|
||||
statuses text[],
|
||||
update_timestamp timestamptz,
|
||||
host_repo_id text not null,
|
||||
primary key (history_revision_id)
|
||||
primary key (host_repo_id, history_revision_id)
|
||||
);
|
||||
|
||||
create table "Lock" (
|
||||
|
||||
@@ -1084,7 +1084,7 @@ ALTER TABLE ONLY public."ClaimsList"
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."ContactHistory"
|
||||
ADD CONSTRAINT "ContactHistory_pkey" PRIMARY KEY (history_revision_id);
|
||||
ADD CONSTRAINT "ContactHistory_pkey" PRIMARY KEY (contact_repo_id, history_revision_id);
|
||||
|
||||
|
||||
--
|
||||
@@ -1140,7 +1140,7 @@ ALTER TABLE ONLY public."GracePeriod"
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."HostHistory"
|
||||
ADD CONSTRAINT "HostHistory_pkey" PRIMARY KEY (history_revision_id);
|
||||
ADD CONSTRAINT "HostHistory_pkey" PRIMARY KEY (host_repo_id, history_revision_id);
|
||||
|
||||
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user