mirror of
https://github.com/google/nomulus.git
synced 2025-07-23 11:16:04 +02:00
Add BSA schema (#2204)
* Add BSA schema Also lock down flyway due to java8 compatiblity
This commit is contained in:
parent
87e99f59bc
commit
b5e131ecba
7 changed files with 2828 additions and 2034 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -145,3 +145,5 @@ V144__drop_database_migration_state_schedule_table.sql
|
|||
V145__add_breakglass_mode_to_tld_table.sql
|
||||
V146__last_update_time_via_epp.sql
|
||||
V147__drop_gaia_id_from_user.sql
|
||||
V148__add_bsa_download_and_label_tables.sql
|
||||
V149__add_bsa_domain_in_use_table.sql
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
-- 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.
|
||||
|
||||
CREATE TABLE "BsaDownload" (
|
||||
job_id bigserial not null,
|
||||
block_list_checksums text not null,
|
||||
creation_time timestamptz not null,
|
||||
stage text not null,
|
||||
update_timestamp timestamptz,
|
||||
primary key (job_id)
|
||||
);
|
||||
|
||||
CREATE TABLE "BsaLabel" (
|
||||
label text not null,
|
||||
creation_time timestamptz not null,
|
||||
primary key (label)
|
||||
);
|
||||
|
||||
CREATE INDEX IDXj874kw19bgdnkxo1rue45jwlw on "BsaDownload" (creation_time);
|
|
@ -0,0 +1,27 @@
|
|||
-- 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.
|
||||
|
||||
CREATE TABLE "BsaDomainInUse" (
|
||||
label text not null,
|
||||
tld text not null,
|
||||
creation_time timestamptz not null,
|
||||
reason text not null,
|
||||
primary key (label, tld)
|
||||
);
|
||||
|
||||
ALTER TABLE IF EXISTS "BsaDomainInUse"
|
||||
ADD CONSTRAINT FKbsadomaininuse2label
|
||||
FOREIGN KEY (label)
|
||||
REFERENCES "BsaLabel" (label)
|
||||
ON DELETE CASCADE;
|
|
@ -123,6 +123,60 @@ CREATE TABLE public."BillingRecurrence" (
|
|||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: BsaDomainInUse; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public."BsaDomainInUse" (
|
||||
label text NOT NULL,
|
||||
tld text NOT NULL,
|
||||
creation_time timestamp with time zone NOT NULL,
|
||||
reason text NOT NULL
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: BsaDownload; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public."BsaDownload" (
|
||||
job_id bigint NOT NULL,
|
||||
block_list_checksums text NOT NULL,
|
||||
creation_time timestamp with time zone NOT NULL,
|
||||
stage text NOT NULL,
|
||||
update_timestamp timestamp with time zone
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: BsaDownload_job_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE public."BsaDownload_job_id_seq"
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: BsaDownload_job_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE public."BsaDownload_job_id_seq" OWNED BY public."BsaDownload".job_id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: BsaLabel; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public."BsaLabel" (
|
||||
label text NOT NULL,
|
||||
creation_time timestamp with time zone NOT NULL
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: ClaimsEntry; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -1155,6 +1209,13 @@ CREATE SEQUENCE public.project_wide_unique_id_seq
|
|||
CACHE 10;
|
||||
|
||||
|
||||
--
|
||||
-- Name: BsaDownload job_id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."BsaDownload" ALTER COLUMN job_id SET DEFAULT nextval('public."BsaDownload_job_id_seq"'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: ClaimsList revision_id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -1257,6 +1318,30 @@ ALTER TABLE ONLY public."BillingRecurrence"
|
|||
ADD CONSTRAINT "BillingRecurrence_pkey" PRIMARY KEY (billing_recurrence_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: BsaDomainInUse BsaDomainInUse_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."BsaDomainInUse"
|
||||
ADD CONSTRAINT "BsaDomainInUse_pkey" PRIMARY KEY (label, tld);
|
||||
|
||||
|
||||
--
|
||||
-- Name: BsaDownload BsaDownload_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."BsaDownload"
|
||||
ADD CONSTRAINT "BsaDownload_pkey" PRIMARY KEY (job_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: BsaLabel BsaLabel_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."BsaLabel"
|
||||
ADD CONSTRAINT "BsaLabel_pkey" PRIMARY KEY (label);
|
||||
|
||||
|
||||
--
|
||||
-- Name: ClaimsEntry ClaimsEntry_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -1847,6 +1932,13 @@ CREATE INDEX idxj1mtx98ndgbtb1bkekahms18w ON public."GracePeriod" USING btree (d
|
|||
CREATE INDEX idxj77pfwhui9f0i7wjq6lmibovj ON public."HostHistory" USING btree (host_name);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idxj874kw19bgdnkxo1rue45jwlw; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idxj874kw19bgdnkxo1rue45jwlw ON public."BsaDownload" USING btree (creation_time);
|
||||
|
||||
|
||||
--
|
||||
-- Name: idxjny8wuot75b5e6p38r47wdawu; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -2622,6 +2714,14 @@ ALTER TABLE ONLY public."DomainHistoryHost"
|
|||
ADD CONSTRAINT fka9woh3hu8gx5x0vly6bai327n FOREIGN KEY (domain_history_domain_repo_id, domain_history_history_revision_id) REFERENCES public."DomainHistory"(domain_repo_id, history_revision_id) DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
|
||||
--
|
||||
-- Name: BsaDomainInUse fkbsadomaininuse2label; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."BsaDomainInUse"
|
||||
ADD CONSTRAINT fkbsadomaininuse2label FOREIGN KEY (label) REFERENCES public."BsaLabel"(label) ON DELETE CASCADE;
|
||||
|
||||
|
||||
--
|
||||
-- Name: DomainTransactionRecord fkcjqe54u72kha71vkibvxhjye7; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
|
|
@ -210,7 +210,7 @@ ext {
|
|||
'org.apache.httpcomponents:httpcore:[4.4.13,)',
|
||||
'org.apache.tomcat:tomcat-annotations-api:[8.0.5,)',
|
||||
'com.fasterxml.jackson.core:jackson-databind:[2.11.2,)',
|
||||
'org.flywaydb:flyway-core:[5.2.4,)',
|
||||
'org.flywaydb:flyway-core:[5.2.4,10.0)!!',
|
||||
'org.glassfish.jaxb:jaxb-runtime:[2.3.0,)',
|
||||
'org.hamcrest:hamcrest:[2.2,)',
|
||||
'org.hamcrest:hamcrest-core:[2.2,)',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue