mirror of
https://github.com/google/nomulus.git
synced 2025-08-14 13:34:07 +02:00
Rename client_id to registrar_id in SQL (#619)
We'll eventually want to shift everything over to using registrar_id and registrarId rather than client_id and clientId but for the sake of the Datastore schema and existing code, we won't change the Java identifier for now. Once we're completely and only on SQL, we can rename the Java field easily.
This commit is contained in:
parent
40b14fb695
commit
b4dfec5fd5
9 changed files with 104 additions and 67 deletions
|
@ -40,7 +40,7 @@ SET default_with_oids = false;
|
|||
|
||||
CREATE TABLE public."BillingCancellation" (
|
||||
billing_cancellation_id bigint NOT NULL,
|
||||
client_id text NOT NULL,
|
||||
registrar_id text NOT NULL,
|
||||
domain_history_revision_id bigint NOT NULL,
|
||||
domain_repo_id text NOT NULL,
|
||||
event_time timestamp with time zone NOT NULL,
|
||||
|
@ -78,7 +78,7 @@ ALTER SEQUENCE public."BillingCancellation_billing_cancellation_id_seq" OWNED BY
|
|||
|
||||
CREATE TABLE public."BillingEvent" (
|
||||
billing_event_id bigint NOT NULL,
|
||||
client_id text NOT NULL,
|
||||
registrar_id text NOT NULL,
|
||||
domain_history_revision_id bigint NOT NULL,
|
||||
domain_repo_id text NOT NULL,
|
||||
event_time timestamp with time zone NOT NULL,
|
||||
|
@ -120,7 +120,7 @@ ALTER SEQUENCE public."BillingEvent_billing_event_id_seq" OWNED BY public."Billi
|
|||
|
||||
CREATE TABLE public."BillingRecurrence" (
|
||||
billing_recurrence_id bigint NOT NULL,
|
||||
client_id text NOT NULL,
|
||||
registrar_id text NOT NULL,
|
||||
domain_history_revision_id bigint NOT NULL,
|
||||
domain_repo_id text NOT NULL,
|
||||
event_time timestamp with time zone NOT NULL,
|
||||
|
@ -198,11 +198,11 @@ ALTER SEQUENCE public."ClaimsList_revision_id_seq" OWNED BY public."ClaimsList".
|
|||
|
||||
CREATE TABLE public."Contact" (
|
||||
repo_id text NOT NULL,
|
||||
creation_client_id text NOT NULL,
|
||||
creation_registrar_id text NOT NULL,
|
||||
creation_time timestamp with time zone NOT NULL,
|
||||
current_sponsor_client_id text NOT NULL,
|
||||
current_sponsor_registrar_id text NOT NULL,
|
||||
deletion_time timestamp with time zone,
|
||||
last_epp_update_client_id text,
|
||||
last_epp_update_registrar_id text,
|
||||
last_epp_update_time timestamp with time zone,
|
||||
statuses text[],
|
||||
auth_info_repo_id text,
|
||||
|
@ -279,11 +279,11 @@ CREATE TABLE public."Cursor" (
|
|||
|
||||
CREATE TABLE public."Domain" (
|
||||
repo_id text NOT NULL,
|
||||
creation_client_id text NOT NULL,
|
||||
creation_registrar_id text NOT NULL,
|
||||
creation_time timestamp with time zone NOT NULL,
|
||||
current_sponsor_client_id text NOT NULL,
|
||||
current_sponsor_registrar_id text NOT NULL,
|
||||
deletion_time timestamp with time zone,
|
||||
last_epp_update_client_id text,
|
||||
last_epp_update_registrar_id text,
|
||||
last_epp_update_time timestamp with time zone,
|
||||
statuses text[],
|
||||
auth_info_repo_id text,
|
||||
|
@ -338,11 +338,11 @@ CREATE TABLE public."DomainHost" (
|
|||
|
||||
CREATE TABLE public."HostResource" (
|
||||
repo_id text NOT NULL,
|
||||
creation_client_id text,
|
||||
creation_registrar_id text,
|
||||
creation_time timestamp with time zone,
|
||||
current_sponsor_client_id text,
|
||||
current_sponsor_registrar_id text,
|
||||
deletion_time timestamp with time zone,
|
||||
last_epp_update_client_id text,
|
||||
last_epp_update_registrar_id text,
|
||||
last_epp_update_time timestamp with time zone,
|
||||
statuses text[],
|
||||
fully_qualified_host_name text,
|
||||
|
@ -467,7 +467,7 @@ ALTER SEQUENCE public."PremiumList_revision_id_seq" OWNED BY public."PremiumList
|
|||
--
|
||||
|
||||
CREATE TABLE public."Registrar" (
|
||||
client_id text NOT NULL,
|
||||
registrar_id text NOT NULL,
|
||||
allowed_tlds text[],
|
||||
billing_account_map public.hstore,
|
||||
billing_identifier bigint,
|
||||
|
@ -793,7 +793,7 @@ ALTER TABLE ONLY public."RegistrarPoc"
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."Registrar"
|
||||
ADD CONSTRAINT "Registrar_pkey" PRIMARY KEY (client_id);
|
||||
ADD CONSTRAINT "Registrar_pkey" PRIMARY KEY (registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -896,7 +896,7 @@ CREATE INDEX idx6syykou4nkc7hqa5p8r92cpch ON public."BillingRecurrence" USING bt
|
|||
-- Name: idx73l103vc5900ig3p4odf0cngt; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idx73l103vc5900ig3p4odf0cngt ON public."BillingEvent" USING btree (client_id);
|
||||
CREATE INDEX idx73l103vc5900ig3p4odf0cngt ON public."BillingEvent" USING btree (registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -931,7 +931,7 @@ CREATE INDEX idxaydgox62uno9qx8cjlj5lauye ON public."PollMessage" USING btree (e
|
|||
-- Name: idxbn8t4wp85fgxjl8q4ctlscx55; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idxbn8t4wp85fgxjl8q4ctlscx55 ON public."Contact" USING btree (current_sponsor_client_id);
|
||||
CREATE INDEX idxbn8t4wp85fgxjl8q4ctlscx55 ON public."Contact" USING btree (current_sponsor_registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -945,7 +945,7 @@ CREATE INDEX idxe7wu46c7wpvfmfnj4565abibp ON public."PollMessage" USING btree (r
|
|||
-- Name: idxeokttmxtpq2hohcioe5t2242b; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idxeokttmxtpq2hohcioe5t2242b ON public."BillingCancellation" USING btree (client_id);
|
||||
CREATE INDEX idxeokttmxtpq2hohcioe5t2242b ON public."BillingCancellation" USING btree (registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -966,7 +966,7 @@ CREATE INDEX idxjny8wuot75b5e6p38r47wdawu ON public."BillingRecurrence" USING bt
|
|||
-- Name: idxkjt9yaq92876dstimd93hwckh; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idxkjt9yaq92876dstimd93hwckh ON public."Domain" USING btree (current_sponsor_client_id);
|
||||
CREATE INDEX idxkjt9yaq92876dstimd93hwckh ON public."Domain" USING btree (current_sponsor_registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -980,7 +980,7 @@ CREATE INDEX idxn1f711wicdnooa2mqb7g1m55o ON public."Contact" USING btree (delet
|
|||
-- Name: idxn898pb9mwcg359cdwvolb11ck; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX idxn898pb9mwcg359cdwvolb11ck ON public."BillingRecurrence" USING btree (client_id);
|
||||
CREATE INDEX idxn898pb9mwcg359cdwvolb11ck ON public."BillingRecurrence" USING btree (registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1051,7 +1051,7 @@ CREATE INDEX reservedlist_name_idx ON public."ReservedList" USING btree (name);
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."Contact"
|
||||
ADD CONSTRAINT fk1sfyj7o7954prbn1exk7lpnoe FOREIGN KEY (creation_client_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk1sfyj7o7954prbn1exk7lpnoe FOREIGN KEY (creation_registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1059,7 +1059,7 @@ ALTER TABLE ONLY public."Contact"
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."Domain"
|
||||
ADD CONSTRAINT fk2jc69qyg2tv9hhnmif6oa1cx1 FOREIGN KEY (creation_client_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk2jc69qyg2tv9hhnmif6oa1cx1 FOREIGN KEY (creation_registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1075,7 +1075,7 @@ ALTER TABLE ONLY public."RegistryLock"
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."Domain"
|
||||
ADD CONSTRAINT fk2u3srsfbei272093m3b3xwj23 FOREIGN KEY (current_sponsor_client_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk2u3srsfbei272093m3b3xwj23 FOREIGN KEY (current_sponsor_registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1091,7 +1091,7 @@ ALTER TABLE ONLY public."ClaimsEntry"
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."Contact"
|
||||
ADD CONSTRAINT fk93c185fx7chn68uv7nl6uv2s0 FOREIGN KEY (current_sponsor_client_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk93c185fx7chn68uv7nl6uv2s0 FOREIGN KEY (current_sponsor_registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1111,11 +1111,11 @@ ALTER TABLE ONLY public."BillingCancellation"
|
|||
|
||||
|
||||
--
|
||||
-- Name: BillingCancellation fk_billing_cancellation_client_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
-- Name: BillingCancellation fk_billing_cancellation_registrar_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."BillingCancellation"
|
||||
ADD CONSTRAINT fk_billing_cancellation_client_id FOREIGN KEY (client_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk_billing_cancellation_registrar_id FOREIGN KEY (registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1127,19 +1127,19 @@ ALTER TABLE ONLY public."BillingEvent"
|
|||
|
||||
|
||||
--
|
||||
-- Name: BillingEvent fk_billing_event_client_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
-- Name: BillingEvent fk_billing_event_registrar_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."BillingEvent"
|
||||
ADD CONSTRAINT fk_billing_event_client_id FOREIGN KEY (client_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk_billing_event_registrar_id FOREIGN KEY (registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: BillingRecurrence fk_billing_recurrence_client_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
-- Name: BillingRecurrence fk_billing_recurrence_registrar_id; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."BillingRecurrence"
|
||||
ADD CONSTRAINT fk_billing_recurrence_client_id FOREIGN KEY (client_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk_billing_recurrence_registrar_id FOREIGN KEY (registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1147,7 +1147,7 @@ ALTER TABLE ONLY public."BillingRecurrence"
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."Contact"
|
||||
ADD CONSTRAINT fk_contact_transfer_gaining_registrar_id FOREIGN KEY (transfer_gaining_registrar_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk_contact_transfer_gaining_registrar_id FOREIGN KEY (transfer_gaining_registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1155,7 +1155,7 @@ ALTER TABLE ONLY public."Contact"
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."Contact"
|
||||
ADD CONSTRAINT fk_contact_transfer_losing_registrar_id FOREIGN KEY (transfer_losing_registrar_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk_contact_transfer_losing_registrar_id FOREIGN KEY (transfer_losing_registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1219,7 +1219,7 @@ ALTER TABLE ONLY public."Domain"
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."Domain"
|
||||
ADD CONSTRAINT fk_domain_transfer_gaining_registrar_id FOREIGN KEY (transfer_gaining_registrar_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk_domain_transfer_gaining_registrar_id FOREIGN KEY (transfer_gaining_registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1227,7 +1227,7 @@ ALTER TABLE ONLY public."Domain"
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."Domain"
|
||||
ADD CONSTRAINT fk_domain_transfer_losing_registrar_id FOREIGN KEY (transfer_losing_registrar_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk_domain_transfer_losing_registrar_id FOREIGN KEY (transfer_losing_registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1275,7 +1275,7 @@ ALTER TABLE ONLY public."PollMessage"
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."PollMessage"
|
||||
ADD CONSTRAINT fk_poll_message_registrar_id FOREIGN KEY (registrar_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk_poll_message_registrar_id FOREIGN KEY (registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1283,7 +1283,7 @@ ALTER TABLE ONLY public."PollMessage"
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."PollMessage"
|
||||
ADD CONSTRAINT fk_poll_message_transfer_response_gaining_registrar_id FOREIGN KEY (transfer_response_gaining_registrar_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk_poll_message_transfer_response_gaining_registrar_id FOREIGN KEY (transfer_response_gaining_registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1291,7 +1291,7 @@ ALTER TABLE ONLY public."PollMessage"
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."PollMessage"
|
||||
ADD CONSTRAINT fk_poll_message_transfer_response_losing_registrar_id FOREIGN KEY (transfer_response_losing_registrar_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fk_poll_message_transfer_response_losing_registrar_id FOREIGN KEY (transfer_response_losing_registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1315,7 +1315,7 @@ ALTER TABLE ONLY public."ReservedEntry"
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."Domain"
|
||||
ADD CONSTRAINT fkjc0r9r5y1lfbt4gpbqw4wsuvq FOREIGN KEY (last_epp_update_client_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fkjc0r9r5y1lfbt4gpbqw4wsuvq FOREIGN KEY (last_epp_update_registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
@ -1323,7 +1323,7 @@ ALTER TABLE ONLY public."Domain"
|
|||
--
|
||||
|
||||
ALTER TABLE ONLY public."Contact"
|
||||
ADD CONSTRAINT fkmb7tdiv85863134w1wogtxrb2 FOREIGN KEY (last_epp_update_client_id) REFERENCES public."Registrar"(client_id);
|
||||
ADD CONSTRAINT fkmb7tdiv85863134w1wogtxrb2 FOREIGN KEY (last_epp_update_registrar_id) REFERENCES public."Registrar"(registrar_id);
|
||||
|
||||
|
||||
--
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue