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:
gbrodman 2020-06-10 15:11:27 -04:00 committed by GitHub
parent 436137444a
commit 1a1f5740a4
9 changed files with 104 additions and 67 deletions

View file

@ -14,7 +14,7 @@
create table "BillingCancellation" (
billing_cancellation_id bigserial not null,
client_id text not null,
registrar_id text not null,
domain_history_revision_id int8 not null,
domain_repo_id text not null,
event_time timestamptz not null,
@ -29,7 +29,7 @@
create table "BillingEvent" (
billing_event_id bigserial not null,
client_id text not null,
registrar_id text not null,
domain_history_revision_id int8 not null,
domain_repo_id text not null,
event_time timestamptz not null,
@ -48,7 +48,7 @@
create table "BillingRecurrence" (
billing_recurrence_id bigserial not null,
client_id text not null,
registrar_id text not null,
domain_history_revision_id int8 not null,
domain_repo_id text not null,
event_time timestamptz not null,
@ -76,11 +76,11 @@
create table "Contact" (
repo_id text not null,
creation_client_id text not null,
creation_registrar_id text not null,
creation_time timestamptz not null,
current_sponsor_client_id text not null,
current_sponsor_registrar_id text not null,
deletion_time timestamptz,
last_epp_update_client_id text,
last_epp_update_registrar_id text,
last_epp_update_time timestamptz,
statuses text[],
auth_info_repo_id text,
@ -157,11 +157,11 @@
create table "Domain" (
repo_id text not null,
creation_client_id text not null,
creation_registrar_id text not null,
creation_time timestamptz not null,
current_sponsor_client_id text not null,
current_sponsor_registrar_id text not null,
deletion_time timestamptz,
last_epp_update_client_id text,
last_epp_update_registrar_id text,
last_epp_update_time timestamptz,
statuses text[],
admin_contact text,
@ -209,7 +209,7 @@
id bigserial not null,
billing_event_one_time bytea,
billing_event_recurring bytea,
client_id text,
registrar_id text,
expiration_time timestamptz,
type int4,
primary key (id)
@ -217,11 +217,11 @@
create table "HostResource" (
repo_id text not null,
creation_client_id text not null,
creation_registrar_id text not null,
creation_time timestamptz not null,
current_sponsor_client_id text not null,
current_sponsor_registrar_id text not null,
deletion_time timestamptz,
last_epp_update_client_id text,
last_epp_update_registrar_id text,
last_epp_update_time timestamptz,
statuses text[],
fully_qualified_host_name text,
@ -288,7 +288,7 @@
);
create table "Registrar" (
client_id text not null,
registrar_id text not null,
allowed_tlds text[],
billing_account_map hstore,
billing_identifier int8,
@ -333,7 +333,7 @@
type text not null,
url text,
whois_server text,
primary key (client_id)
primary key (registrar_id)
);
create table "RegistrarPoc" (
@ -386,27 +386,27 @@
should_publish boolean not null,
primary key (revision_id)
);
create index IDXeokttmxtpq2hohcioe5t2242b on "BillingCancellation" (client_id);
create index IDXih4b2tea127p5rb61gje6e1y2 on "BillingCancellation" (registrar_id);
create index IDX2exdfbx6oiiwnhr8j6gjpqt2j on "BillingCancellation" (event_time);
create index IDXqa3g92jc17e8dtiaviy4fet4x on "BillingCancellation" (billing_time);
create index IDX73l103vc5900ig3p4odf0cngt on "BillingEvent" (client_id);
create index IDXqspv57gj2led8ly42fq01t7m7 on "BillingEvent" (registrar_id);
create index IDX5yfbr88439pxw0v3j86c74fp8 on "BillingEvent" (event_time);
create index IDX6py6ocrab0ivr76srcd2okpnq on "BillingEvent" (billing_time);
create index IDXplxf9v56p0wg8ws6qsvd082hk on "BillingEvent" (synthetic_creation_time);
create index IDXhmv411mdqo5ibn4vy7ykxpmlv on "BillingEvent" (allocation_token_id);
create index IDXn898pb9mwcg359cdwvolb11ck on "BillingRecurrence" (client_id);
create index IDXd3gxhkh0jk694pjvh9pyn7wjc on "BillingRecurrence" (registrar_id);
create index IDX6syykou4nkc7hqa5p8r92cpch on "BillingRecurrence" (event_time);
create index IDXp3usbtvk0v1m14i5tdp4xnxgc on "BillingRecurrence" (recurrence_end_time);
create index IDXjny8wuot75b5e6p38r47wdawu on "BillingRecurrence" (recurrence_time_of_year);
create index IDX3y752kr9uh4kh6uig54vemx0l on "Contact" (creation_time);
create index IDXbn8t4wp85fgxjl8q4ctlscx55 on "Contact" (current_sponsor_client_id);
create index IDXtm415d6fe1rr35stm33s5mg18 on "Contact" (current_sponsor_registrar_id);
create index IDXn1f711wicdnooa2mqb7g1m55o on "Contact" (deletion_time);
create index IDX1p3esngcwwu6hstyua6itn6ff on "Contact" (search_name);
alter table if exists "Contact"
add constraint UKoqd7n4hbx86hvlgkilq75olas unique (contact_id);
create index IDX8nr0ke9mrrx4ewj6pd2ag4rmr on "Domain" (creation_time);
create index IDX8ffrqm27qtj20jac056j7yq07 on "Domain" (current_sponsor_client_id);
create index IDXhsjqiy2lyobfymplb28nm74lm on "Domain" (current_sponsor_registrar_id);
create index IDX5mnf0wn20tno4b9do88j61klr on "Domain" (deletion_time);
create index IDX1rcgkdd777bpvj0r94sltwd5y on "Domain" (fully_qualified_domain_name);
create index IDXrwl38wwkli1j7gkvtywi9jokq on "Domain" (tld);