mirror of
https://github.com/google/nomulus
synced 2026-02-07 05:21:15 +00:00
Persist DomainBase.nsHosts VKeys to SQL (#541)
Persist nsHosts in Cloud SQL Persist the VKey based nameserver hosts field of DomainBase in Cloud SQL with foreign key constraints.
This commit is contained in:
@@ -67,6 +67,11 @@
|
||||
primary key (repo_id)
|
||||
);
|
||||
|
||||
create table "DomainHost" (
|
||||
domain_repo_id text not null,
|
||||
ns_host_v_keys text
|
||||
);
|
||||
|
||||
create table "GracePeriod" (
|
||||
id bigserial not null,
|
||||
billing_event_one_time bytea,
|
||||
@@ -77,6 +82,27 @@
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
create table "HostResource" (
|
||||
repo_id text not null,
|
||||
creation_client_id text,
|
||||
creation_time timestamptz,
|
||||
current_sponsor_client_id text,
|
||||
deletion_time timestamptz,
|
||||
last_epp_update_client_id text,
|
||||
last_epp_update_time timestamptz,
|
||||
statuses text[],
|
||||
fully_qualified_host_name text,
|
||||
last_superordinate_change timestamptz,
|
||||
last_transfer_time timestamptz,
|
||||
superordinate_domain bytea,
|
||||
primary key (repo_id)
|
||||
);
|
||||
|
||||
create table "HostResource_inetAddresses" (
|
||||
host_resource_repo_id text not null,
|
||||
inet_addresses bytea
|
||||
);
|
||||
|
||||
create table "Lock" (
|
||||
resource_name text not null,
|
||||
tld text not null,
|
||||
@@ -222,6 +248,16 @@ create index reservedlist_name_idx on "ReservedList" (name);
|
||||
foreign key (revision_id)
|
||||
references "ClaimsList";
|
||||
|
||||
alter table if exists "DomainHost"
|
||||
add constraint FKeq1guccbre1yk3oosgp2io554
|
||||
foreign key (domain_repo_id)
|
||||
references "Domain";
|
||||
|
||||
alter table if exists "HostResource_inetAddresses"
|
||||
add constraint FK6unwhfkcu3oq6q347fxvpagv
|
||||
foreign key (host_resource_repo_id)
|
||||
references "HostResource";
|
||||
|
||||
alter table if exists "PremiumEntry"
|
||||
add constraint FKo0gw90lpo1tuee56l0nb6y6g5
|
||||
foreign key (revision_id)
|
||||
|
||||
@@ -116,6 +116,46 @@ CREATE TABLE public."Domain" (
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: DomainHost; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public."DomainHost" (
|
||||
domain_repo_id text NOT NULL,
|
||||
ns_host_v_keys text
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: HostResource; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public."HostResource" (
|
||||
repo_id text NOT NULL,
|
||||
creation_client_id text,
|
||||
creation_time timestamp with time zone,
|
||||
current_sponsor_client_id text,
|
||||
deletion_time timestamp with time zone,
|
||||
last_epp_update_client_id text,
|
||||
last_epp_update_time timestamp with time zone,
|
||||
statuses text[],
|
||||
fully_qualified_host_name text,
|
||||
last_superordinate_change timestamp with time zone,
|
||||
last_transfer_time timestamp with time zone,
|
||||
superordinate_domain bytea
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: HostResource_inetAddresses; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE TABLE public."HostResource_inetAddresses" (
|
||||
host_resource_repo_id text NOT NULL,
|
||||
inet_addresses bytea
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: Lock; Type: TABLE; Schema: public; Owner: -
|
||||
--
|
||||
@@ -390,6 +430,14 @@ ALTER TABLE ONLY public."Domain"
|
||||
ADD CONSTRAINT "Domain_pkey" PRIMARY KEY (repo_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: HostResource HostResource_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."HostResource"
|
||||
ADD CONSTRAINT "HostResource_pkey" PRIMARY KEY (repo_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: Lock Lock_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
@@ -562,6 +610,30 @@ ALTER TABLE ONLY public."ClaimsEntry"
|
||||
ADD CONSTRAINT fk6sc6at5hedffc0nhdcab6ivuq FOREIGN KEY (revision_id) REFERENCES public."ClaimsList"(revision_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: HostResource_inetAddresses fk6unwhfkcu3oq6q347fxvpagv; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."HostResource_inetAddresses"
|
||||
ADD CONSTRAINT fk6unwhfkcu3oq6q347fxvpagv FOREIGN KEY (host_resource_repo_id) REFERENCES public."HostResource"(repo_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: DomainHost fk_domainhost_host_valid; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."DomainHost"
|
||||
ADD CONSTRAINT fk_domainhost_host_valid FOREIGN KEY (ns_host_v_keys) REFERENCES public."HostResource"(repo_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: DomainHost fkfmi7bdink53swivs390m2btxg; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."DomainHost"
|
||||
ADD CONSTRAINT fkfmi7bdink53swivs390m2btxg FOREIGN KEY (domain_repo_id) REFERENCES public."Domain"(repo_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: ReservedEntry fkgq03rk0bt1hb915dnyvd3vnfc; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user