mirror of
https://github.com/google/nomulus
synced 2026-08-28 11:56:11 +00:00
Change pkey of User to emailAddress (#2505)
Originally, we though that User entities were going to have mutable email addresses, and thus would require a non-changing primary key. This proved to not be the case. It'll simplify the User loading/saving code if we just do everything by email address. Obviously this doesn't change much functionality, but it prepares us for removing the id field down the line once the changes propagate.
This commit is contained in:
@@ -1317,7 +1317,7 @@ CREATE TABLE public."TmchCrl" (
|
||||
--
|
||||
|
||||
CREATE TABLE public."User" (
|
||||
id bigint NOT NULL,
|
||||
id bigint,
|
||||
email_address text NOT NULL,
|
||||
registry_lock_password_hash text,
|
||||
registry_lock_password_salt text,
|
||||
@@ -1833,7 +1833,7 @@ ALTER TABLE ONLY public."UserUpdateHistory"
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public."User"
|
||||
ADD CONSTRAINT "User_pkey" PRIMARY KEY (id);
|
||||
ADD CONSTRAINT "User_pkey" PRIMARY KEY (email_address);
|
||||
|
||||
|
||||
--
|
||||
@@ -2547,13 +2547,6 @@ CREATE INDEX spec11threatmatch_registrar_id_idx ON public."Spec11ThreatMatch" US
|
||||
CREATE INDEX spec11threatmatch_tld_idx ON public."Spec11ThreatMatch" USING btree (tld);
|
||||
|
||||
|
||||
--
|
||||
-- Name: user_email_address_idx; Type: INDEX; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE INDEX user_email_address_idx ON public."User" USING btree (email_address);
|
||||
|
||||
|
||||
--
|
||||
-- Name: UserUpdateHistory fk1s7bopbl3pwrhv3jkkofnv3o0; Type: FK CONSTRAINT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user