diff --git a/db/src/main/resources/sql/er_diagram/brief_er_diagram.html b/db/src/main/resources/sql/er_diagram/brief_er_diagram.html index 5cf240d73..99ef8565f 100644 --- a/db/src/main/resources/sql/er_diagram/brief_er_diagram.html +++ b/db/src/main/resources/sql/er_diagram/brief_er_diagram.html @@ -261,19 +261,19 @@ td.section { generated on - 2022-08-08 20:39:49.590205 + 2022-08-17 16:58:06.253891 last flyway file - V123__drop_unused_columns_in_billing_cancellation_table.sql + V124__add_console_user.sql

 

 

- + SchemaCrawler_Diagram - + generated by @@ -284,7 +284,7 @@ td.section { generated on - 2022-08-08 20:39:49.590205 + 2022-08-17 16:58:06.253891 @@ -3133,6 +3133,42 @@ td.section { int8 not null + + + user_f2216f01 + + + public."User" + + + + [table] + + + id + + + + + int8 not null + + + email_address + + + + + text not null + + + gaia_id + + + + + text not null + + @@ -6905,6 +6941,46 @@ td.section {

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
public."User" [table] +
idint8 not null
email_addresstext not null
gaia_idtext not null
Primary Key
User_pkey[primary key]
id
+

 

\ No newline at end of file diff --git a/db/src/main/resources/sql/er_diagram/full_er_diagram.html b/db/src/main/resources/sql/er_diagram/full_er_diagram.html index ef4265441..269581d7e 100644 --- a/db/src/main/resources/sql/er_diagram/full_er_diagram.html +++ b/db/src/main/resources/sql/er_diagram/full_er_diagram.html @@ -261,32 +261,32 @@ td.section { generated on - 2022-08-08 20:39:47.815781 + 2022-08-17 16:58:04.28641 last flyway file - V123__drop_unused_columns_in_billing_cancellation_table.sql + V124__add_console_user.sql

 

 

- + SchemaCrawler_Diagram - - + + generated by - + SchemaCrawler 16.10.1 - + generated on - - 2022-08-08 20:39:47.815781 + + 2022-08-17 16:58:04.28641 - + allocationtoken_a08ccbef @@ -6413,6 +6413,82 @@ td.section { int8 not null + + + user_f2216f01 + + + public."User" + + + + [table] + + + id + + + + + int8 not null + + + email_address + + + + + text not null + + + gaia_id + + + + + text not null + + + registry_lock_password_hash + + + + + text + + + registry_lock_password_salt + + + + + text + + + global_role + + + + + text not null + + + is_admin + + + + + bool not null + + + registrar_roles + + + + + "hstore" not null + + @@ -13983,6 +14059,113 @@ td.section {

 

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
public."User" [table] +
idint8 not null
email_addresstext not null
gaia_idtext not null
registry_lock_password_hashtext
registry_lock_password_salttext
global_roletext not null
is_adminbool not null
registrar_roles"hstore" not null
Primary Key
User_pkey[primary key]
id
Indexes
User_pkey[unique index]
idascending
user_email_address_idx[non-unique index]
email_addressascending
user_gaia_id_idx[non-unique index]
gaia_idascending
+

 

\ No newline at end of file diff --git a/db/src/main/resources/sql/flyway.txt b/db/src/main/resources/sql/flyway.txt index 4d1283dd9..bf897ad7b 100644 --- a/db/src/main/resources/sql/flyway.txt +++ b/db/src/main/resources/sql/flyway.txt @@ -121,3 +121,4 @@ V120__remove_ofy_key_fields.sql V121__drop_sql_checkpoint_and_txn.sql V122__add_current_package_token_to_domain.sql V123__drop_unused_columns_in_billing_cancellation_table.sql +V124__add_console_user.sql diff --git a/db/src/main/resources/sql/flyway/V124__add_console_user.sql b/db/src/main/resources/sql/flyway/V124__add_console_user.sql new file mode 100644 index 000000000..a3bc38413 --- /dev/null +++ b/db/src/main/resources/sql/flyway/V124__add_console_user.sql @@ -0,0 +1,28 @@ +-- Copyright 2022 The Nomulus Authors. All Rights Reserved. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. + +CREATE TABLE "User" ( + id int8 NOT NULL, + email_address text NOT NULL, + gaia_id text NOT NULL, + registry_lock_password_hash text, + registry_lock_password_salt text, + global_role text NOT NULL, + is_admin boolean NOT NULL, + registrar_roles hstore NOT NULL, + PRIMARY KEY(id) +); + +CREATE INDEX user_gaia_id_idx ON "User" (gaia_id); +CREATE INDEX user_email_address_idx ON "User" (email_address); diff --git a/db/src/main/resources/sql/schema/nomulus.golden.sql b/db/src/main/resources/sql/schema/nomulus.golden.sql index 0a11348b1..1c31971d0 100644 --- a/db/src/main/resources/sql/schema/nomulus.golden.sql +++ b/db/src/main/resources/sql/schema/nomulus.golden.sql @@ -1039,6 +1039,22 @@ CREATE TABLE public."TmchCrl" ( ); +-- +-- Name: User; Type: TABLE; Schema: public; Owner: - +-- + +CREATE TABLE public."User" ( + id bigint NOT NULL, + email_address text NOT NULL, + gaia_id text NOT NULL, + registry_lock_password_hash text, + registry_lock_password_salt text, + global_role text NOT NULL, + is_admin boolean NOT NULL, + registrar_roles public.hstore NOT NULL +); + + -- -- Name: ClaimsList revision_id; Type: DEFAULT; Schema: public; Owner: - -- @@ -1368,6 +1384,14 @@ ALTER TABLE ONLY public."TmchCrl" ADD CONSTRAINT "TmchCrl_pkey" PRIMARY KEY (id); +-- +-- Name: User User_pkey; Type: CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY public."User" + ADD CONSTRAINT "User_pkey" PRIMARY KEY (id); + + -- -- Name: RegistryLock idx_registry_lock_repo_id_revision_id; Type: CONSTRAINT; Schema: public; Owner: - -- @@ -1952,6 +1976,20 @@ 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: user_gaia_id_idx; Type: INDEX; Schema: public; Owner: - +-- + +CREATE INDEX user_gaia_id_idx ON public."User" USING btree (gaia_id); + + -- -- Name: Contact fk1sfyj7o7954prbn1exk7lpnoe; Type: FK CONSTRAINT; Schema: public; Owner: - --