mirror of
https://github.com/google/nomulus
synced 2025-12-23 06:15:42 +00:00
Add SQL code for simplified console update history table (#2710)
We'll remove the old ones, but this one adds the new simplified version
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -184,3 +184,4 @@ V183__remove_fk_billingrecurrence_domainhistory.sql
|
||||
V184__remove_fk_pollmessage_domainhistory.sql
|
||||
V185__remove_fk_domaintransactionrecord_domainhistory.sql
|
||||
V186__remove_fk_domaindsdatahistory_domainhistory.sql
|
||||
V187__console_update_history.sql
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
-- 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 "ConsoleUpdateHistory" (
|
||||
revision_id bigint NOT NULL,
|
||||
modification_time timestamp with time zone NOT NULL,
|
||||
method text NOT NULL,
|
||||
type text NOT NULL,
|
||||
url text NOT NULL,
|
||||
description text,
|
||||
acting_user text NOT NULL,
|
||||
PRIMARY KEY (revision_id),
|
||||
CONSTRAINT fk_console_update_history_acting_user
|
||||
FOREIGN KEY(acting_user)
|
||||
REFERENCES "User" (email_address)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_console_update_history_acting_user
|
||||
ON "ConsoleUpdateHistory" (acting_user);
|
||||
CREATE INDEX IF NOT EXISTS idx_console_update_history_type
|
||||
ON "ConsoleUpdateHistory" (type);
|
||||
CREATE INDEX IF NOT EXISTS idx_console_update_history_modification_time
|
||||
ON "ConsoleUpdateHistory" (modification_time);
|
||||
@@ -272,6 +272,21 @@ CREATE TABLE public."ConsoleEppActionHistory" (
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: ConsoleUpdateHistory; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public."ConsoleUpdateHistory" (
|
||||
revision_id bigint NOT NULL,
|
||||
modification_time timestamp with time zone NOT NULL,
|
||||
method text NOT NULL,
|
||||
type text NOT NULL,
|
||||
url text NOT NULL,
|
||||
description text,
|
||||
acting_user text NOT NULL
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: Contact; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
@@ -1530,6 +1545,14 @@ ALTER TABLE ONLY public."ConsoleEppActionHistory"
|
||||
ADD CONSTRAINT "ConsoleEppActionHistory_pkey" PRIMARY KEY (history_revision_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: ConsoleUpdateHistory ConsoleUpdateHistory_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."ConsoleUpdateHistory"
|
||||
ADD CONSTRAINT "ConsoleUpdateHistory_pkey" PRIMARY KEY (revision_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: ContactHistory ContactHistory_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@@ -2052,6 +2075,27 @@ CREATE INDEX idx9g3s7mjv1yn4t06nqid39whss ON public."AllocationToken" USING btre
|
||||
CREATE INDEX idx9q53px6r302ftgisqifmc6put ON public."ContactHistory" USING btree (history_type);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idx_console_update_history_acting_user; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idx_console_update_history_acting_user ON public."ConsoleUpdateHistory" USING btree (acting_user);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idx_console_update_history_modification_time; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idx_console_update_history_modification_time ON public."ConsoleUpdateHistory" USING btree (modification_time);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idx_console_update_history_type; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idx_console_update_history_type ON public."ConsoleUpdateHistory" USING btree (type);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idx_registry_lock_registrar_id; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
@@ -2690,6 +2734,14 @@ ALTER TABLE ONLY public."BillingRecurrence"
|
||||
ADD CONSTRAINT fk_billing_recurrence_registrar_id FOREIGN KEY (registrar_id) REFERENCES public."Registrar"(registrar_id) DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
|
||||
--
|
||||
-- Name: ConsoleUpdateHistory fk_console_update_history_acting_user; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."ConsoleUpdateHistory"
|
||||
ADD CONSTRAINT fk_console_update_history_acting_user FOREIGN KEY (acting_user) REFERENCES public."User"(email_address);
|
||||
|
||||
|
||||
--
|
||||
-- Name: ContactHistory fk_contact_history_contact_repo_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user