Change pkey of User to emailAddress (#2505)
CodeQL / Analyze (java) (push) Failing after 1m22s
CodeQL / Analyze (javascript) (push) Failing after 1m13s
CodeQL / Analyze (python) (push) Failing after 51s
Dependency Submission / dependency-submission (push) Successful in 2m11s

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:
gbrodman
2024-07-29 22:27:06 +00:00
committed by GitHub
parent 53a7d1b66c
commit d33571dde3
12 changed files with 869 additions and 874 deletions
@@ -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: -
--