mirror of
https://github.com/google/nomulus
synced 2026-08-19 05:36:11 +00:00
Add SQL schema and DAO for SignedMarkRevocationList (#850)
* Add SQL schema and DAO for SignedMarkRevocationList This gets saved every day so we're not concerned about history, meaning we can dual-write and/or dual-read without concern. The structure here is somewhat similar to the ClaimsListDao and related classes. * Update the DB files
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
@@ -67,3 +67,4 @@ V66__create_rde_revision.sql
|
||||
V67__grace_period_history_ids.sql
|
||||
V68__make_reserved_list_nullable_in_registry.sql
|
||||
V69__change_primary_key_and_add_history_table_for_delegation_signer.sql
|
||||
V70__signed_mark_revocation_list.sql
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
-- 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.
|
||||
|
||||
create table "SignedMarkRevocationEntry" (
|
||||
revision_id int8 not null,
|
||||
revocation_time timestamptz not null,
|
||||
smd_id text not null,
|
||||
primary key (revision_id, smd_id)
|
||||
);
|
||||
|
||||
create table "SignedMarkRevocationList" (
|
||||
revision_id bigserial not null,
|
||||
creation_time timestamptz,
|
||||
primary key (revision_id)
|
||||
);
|
||||
|
||||
alter table if exists "SignedMarkRevocationEntry"
|
||||
add constraint FK5ivlhvs3121yx2li5tqh54u4
|
||||
foreign key (revision_id)
|
||||
references "SignedMarkRevocationList";
|
||||
@@ -617,6 +617,19 @@
|
||||
primary key (revision_id)
|
||||
);
|
||||
|
||||
create table "SignedMarkRevocationEntry" (
|
||||
revision_id int8 not null,
|
||||
revocation_time timestamptz not null,
|
||||
smd_id text not null,
|
||||
primary key (revision_id, smd_id)
|
||||
);
|
||||
|
||||
create table "SignedMarkRevocationList" (
|
||||
revision_id bigserial not null,
|
||||
creation_time timestamptz,
|
||||
primary key (revision_id)
|
||||
);
|
||||
|
||||
create table "Spec11ThreatMatch" (
|
||||
id bigserial not null,
|
||||
check_date date not null,
|
||||
@@ -779,3 +792,8 @@ create index spec11threatmatch_check_date_idx on "Spec11ThreatMatch" (check_date
|
||||
add constraint FKgq03rk0bt1hb915dnyvd3vnfc
|
||||
foreign key (revision_id)
|
||||
references "ReservedList";
|
||||
|
||||
alter table if exists "SignedMarkRevocationEntry"
|
||||
add constraint FK5ivlhvs3121yx2li5tqh54u4
|
||||
foreign key (revision_id)
|
||||
references "SignedMarkRevocationList";
|
||||
|
||||
@@ -886,6 +886,46 @@ CREATE SEQUENCE public."SafeBrowsingThreat_id_seq"
|
||||
ALTER SEQUENCE public."SafeBrowsingThreat_id_seq" OWNED BY public."Spec11ThreatMatch".id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: SignedMarkRevocationEntry; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public."SignedMarkRevocationEntry" (
|
||||
revision_id bigint NOT NULL,
|
||||
revocation_time timestamp with time zone NOT NULL,
|
||||
smd_id text NOT NULL
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: SignedMarkRevocationList; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public."SignedMarkRevocationList" (
|
||||
revision_id bigint NOT NULL,
|
||||
creation_time timestamp with time zone
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: SignedMarkRevocationList_revision_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public."SignedMarkRevocationList_revision_id_seq"
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: SignedMarkRevocationList_revision_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE public."SignedMarkRevocationList_revision_id_seq" OWNED BY public."SignedMarkRevocationList".revision_id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: Tld; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
@@ -996,6 +1036,13 @@ ALTER TABLE ONLY public."RegistryLock" ALTER COLUMN revision_id SET DEFAULT next
|
||||
ALTER TABLE ONLY public."ReservedList" ALTER COLUMN revision_id SET DEFAULT nextval('public."ReservedList_revision_id_seq"'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: SignedMarkRevocationList revision_id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."SignedMarkRevocationList" ALTER COLUMN revision_id SET DEFAULT nextval('public."SignedMarkRevocationList_revision_id_seq"'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: Spec11ThreatMatch id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
@@ -1234,6 +1281,22 @@ ALTER TABLE ONLY public."Spec11ThreatMatch"
|
||||
ADD CONSTRAINT "SafeBrowsingThreat_pkey" PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: SignedMarkRevocationEntry SignedMarkRevocationEntry_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."SignedMarkRevocationEntry"
|
||||
ADD CONSTRAINT "SignedMarkRevocationEntry_pkey" PRIMARY KEY (revision_id, smd_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: SignedMarkRevocationList SignedMarkRevocationList_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."SignedMarkRevocationList"
|
||||
ADD CONSTRAINT "SignedMarkRevocationList_pkey" PRIMARY KEY (revision_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: Tld Tld_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@@ -1655,6 +1718,14 @@ ALTER TABLE ONLY public."HostHistory"
|
||||
ADD CONSTRAINT fk3d09knnmxrt6iniwnp8j2ykga FOREIGN KEY (history_registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: SignedMarkRevocationEntry fk5ivlhvs3121yx2li5tqh54u4; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."SignedMarkRevocationEntry"
|
||||
ADD CONSTRAINT fk5ivlhvs3121yx2li5tqh54u4 FOREIGN KEY (revision_id) REFERENCES public."SignedMarkRevocationList"(revision_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: ClaimsEntry fk6sc6at5hedffc0nhdcab6ivuq; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user