Add Flyway and golden files for console User object (#1747)

This commit is contained in:
gbrodman 2022-08-17 16:48:14 -04:00 committed by GitHub
parent 2ffba93a73
commit 8c1dc16848
5 changed files with 341 additions and 15 deletions

View file

@ -261,19 +261,19 @@ td.section {
</tr>
<tr>
<td class="property_name">generated on</td>
<td class="property_value">2022-08-08 20:39:49.590205</td>
<td class="property_value">2022-08-17 16:58:06.253891</td>
</tr>
<tr>
<td class="property_name">last flyway file</td>
<td id="lastFlywayFile" class="property_value">V123__drop_unused_columns_in_billing_cancellation_table.sql</td>
<td id="lastFlywayFile" class="property_value">V124__add_console_user.sql</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<svg viewbox="0.00 0.00 4029.00 2877.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="erDiagram" style="overflow: hidden; width: 100%; height: 800px"><g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 2873)">
<svg viewbox="0.00 0.00 4029.00 2981.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="erDiagram" style="overflow: hidden; width: 100%; height: 800px"><g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 2977)">
<title>SchemaCrawler_Diagram</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-2873 4025,-2873 4025,4 -4,4" />
<polygon fill="white" stroke="transparent" points="-4,4 -4,-2977 4025,-2977 4025,4 -4,4" />
<text text-anchor="start" x="3752.5" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">
generated by
</text>
@ -284,7 +284,7 @@ td.section {
generated on
</text>
<text text-anchor="start" x="3835.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">
2022-08-08 20:39:49.590205
2022-08-17 16:58:06.253891
</text>
<polygon fill="none" stroke="#888888" points="3748,-4 3748,-44 4013,-44 4013,-4 3748,-4" /> <!-- allocationtoken_a08ccbef -->
<g id="node1" class="node">
@ -3133,6 +3133,42 @@ td.section {
int8 not null
</text>
<polygon fill="none" stroke="#888888" points="3735.5,-2825 3735.5,-2865 3915.5,-2865 3915.5,-2825 3735.5,-2825" />
</g> <!-- user_f2216f01 -->
<g id="node38" class="node">
<title>user_f2216f01</title>
<polygon fill="#ebcef2" stroke="transparent" points="3738.5,-2949 3738.5,-2968 3839.5,-2968 3839.5,-2949 3738.5,-2949" />
<text text-anchor="start" x="3740.5" y="-2955.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
public."User"
</text>
<polygon fill="#ebcef2" stroke="transparent" points="3839.5,-2949 3839.5,-2968 3913.5,-2968 3913.5,-2949 3839.5,-2949" />
<text text-anchor="start" x="3874.5" y="-2954.8" font-family="Helvetica,sans-Serif" font-size="14.00">
[table]
</text>
<text text-anchor="start" x="3740.5" y="-2936.8" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
id
</text>
<text text-anchor="start" x="3833.5" y="-2935.8" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="3841.5" y="-2935.8" font-family="Helvetica,sans-Serif" font-size="14.00">
int8 not null
</text>
<text text-anchor="start" x="3740.5" y="-2916.8" font-family="Helvetica,sans-Serif" font-size="14.00">
email_address
</text>
<text text-anchor="start" x="3833.5" y="-2916.8" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="3841.5" y="-2916.8" font-family="Helvetica,sans-Serif" font-size="14.00">
text not null
</text>
<text text-anchor="start" x="3740.5" y="-2897.8" font-family="Helvetica,sans-Serif" font-size="14.00">
gaia_id
</text>
<text text-anchor="start" x="3833.5" y="-2897.8" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="3841.5" y="-2897.8" font-family="Helvetica,sans-Serif" font-size="14.00">
text not null
</text>
<polygon fill="none" stroke="#888888" points="3737,-2891 3737,-2969 3914,-2969 3914,-2891 3737,-2891" />
</g>
</g>
</svg>
@ -6905,6 +6941,46 @@ td.section {
</tbody>
</table>
<p>&nbsp;</p>
<table>
<caption style="background-color: #EBCEF2;"><span id="user_f2216f01" class="caption_name">public."User"</span> <span class="caption_description">[table]</span>
</caption>
<tbody>
<tr>
<td class="spacer"></td>
<td class="minwidth"><b><i>id</i></b></td>
<td class="minwidth">int8 not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">email_address</td>
<td class="minwidth">text not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">gaia_id</td>
<td class="minwidth">text not null</td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="3" class="section">Primary Key</td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="2" class="name">User_pkey</td>
<td class="description right">[primary key]</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">id</td>
<td class="minwidth"></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<script>svgPanZoom('#erDiagram', { zoomEnabled: true, controlIconsEnabled: true, fit: true, center: true, minZoom: 0.1});</script>
</body>
</html>

View file

@ -261,32 +261,32 @@ td.section {
</tr>
<tr>
<td class="property_name">generated on</td>
<td class="property_value">2022-08-08 20:39:47.815781</td>
<td class="property_value">2022-08-17 16:58:04.28641</td>
</tr>
<tr>
<td class="property_name">last flyway file</td>
<td id="lastFlywayFile" class="property_value">V123__drop_unused_columns_in_billing_cancellation_table.sql</td>
<td id="lastFlywayFile" class="property_value">V124__add_console_user.sql</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<svg viewbox="0.00 0.00 4713.00 6753.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="erDiagram" style="overflow: hidden; width: 100%; height: 800px"><g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 6749)">
<svg viewbox="0.00 0.00 4713.00 6952.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="erDiagram" style="overflow: hidden; width: 100%; height: 800px"><g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 6948)">
<title>SchemaCrawler_Diagram</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-6749 4709,-6749 4709,4 -4,4" />
<text text-anchor="start" x="4436.5" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">
<polygon fill="white" stroke="transparent" points="-4,4 -4,-6948 4709,-6948 4709,4 -4,4" />
<text text-anchor="start" x="4444.5" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">
generated by
</text>
<text text-anchor="start" x="4519.5" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4527.5" y="-29.8" font-family="Helvetica,sans-Serif" font-size="14.00">
SchemaCrawler 16.10.1
</text>
<text text-anchor="start" x="4435.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">
<text text-anchor="start" x="4443.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">
generated on
</text>
<text text-anchor="start" x="4519.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">
2022-08-08 20:39:47.815781
<text text-anchor="start" x="4527.5" y="-10.8" font-family="Helvetica,sans-Serif" font-size="14.00">
2022-08-17 16:58:04.28641
</text>
<polygon fill="none" stroke="#888888" points="4432,-4 4432,-44 4697,-44 4697,-4 4432,-4" /> <!-- allocationtoken_a08ccbef -->
<polygon fill="none" stroke="#888888" points="4440,-4 4440,-44 4697,-44 4697,-4 4440,-4" /> <!-- allocationtoken_a08ccbef -->
<g id="node1" class="node">
<title>allocationtoken_a08ccbef</title>
<polygon fill="#ebcef2" stroke="transparent" points="1380.5,-1056.5 1380.5,-1075.5 1579.5,-1075.5 1579.5,-1056.5 1380.5,-1056.5" />
@ -6413,6 +6413,82 @@ td.section {
int8 not null
</text>
<polygon fill="none" stroke="#888888" points="4330.5,-6644 4330.5,-6741 4605.5,-6741 4605.5,-6644 4330.5,-6644" />
</g> <!-- user_f2216f01 -->
<g id="node38" class="node">
<title>user_f2216f01</title>
<polygon fill="#ebcef2" stroke="transparent" points="4323,-6919.5 4323,-6938.5 4513,-6938.5 4513,-6919.5 4323,-6919.5" />
<text text-anchor="start" x="4325" y="-6926.3" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
public."User"
</text>
<polygon fill="#ebcef2" stroke="transparent" points="4513,-6919.5 4513,-6938.5 4613,-6938.5 4613,-6919.5 4513,-6919.5" />
<text text-anchor="start" x="4574" y="-6925.3" font-family="Helvetica,sans-Serif" font-size="14.00">
[table]
</text>
<text text-anchor="start" x="4325" y="-6907.3" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">
id
</text>
<text text-anchor="start" x="4507" y="-6906.3" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4515" y="-6906.3" font-family="Helvetica,sans-Serif" font-size="14.00">
int8 not null
</text>
<text text-anchor="start" x="4325" y="-6887.3" font-family="Helvetica,sans-Serif" font-size="14.00">
email_address
</text>
<text text-anchor="start" x="4507" y="-6887.3" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4515" y="-6887.3" font-family="Helvetica,sans-Serif" font-size="14.00">
text not null
</text>
<text text-anchor="start" x="4325" y="-6868.3" font-family="Helvetica,sans-Serif" font-size="14.00">
gaia_id
</text>
<text text-anchor="start" x="4507" y="-6868.3" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4515" y="-6868.3" font-family="Helvetica,sans-Serif" font-size="14.00">
text not null
</text>
<text text-anchor="start" x="4325" y="-6849.3" font-family="Helvetica,sans-Serif" font-size="14.00">
registry_lock_password_hash
</text>
<text text-anchor="start" x="4507" y="-6849.3" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4515" y="-6849.3" font-family="Helvetica,sans-Serif" font-size="14.00">
text
</text>
<text text-anchor="start" x="4325" y="-6830.3" font-family="Helvetica,sans-Serif" font-size="14.00">
registry_lock_password_salt
</text>
<text text-anchor="start" x="4507" y="-6830.3" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4515" y="-6830.3" font-family="Helvetica,sans-Serif" font-size="14.00">
text
</text>
<text text-anchor="start" x="4325" y="-6811.3" font-family="Helvetica,sans-Serif" font-size="14.00">
global_role
</text>
<text text-anchor="start" x="4507" y="-6811.3" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4515" y="-6811.3" font-family="Helvetica,sans-Serif" font-size="14.00">
text not null
</text>
<text text-anchor="start" x="4325" y="-6792.3" font-family="Helvetica,sans-Serif" font-size="14.00">
is_admin
</text>
<text text-anchor="start" x="4507" y="-6792.3" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4515" y="-6792.3" font-family="Helvetica,sans-Serif" font-size="14.00">
bool not null
</text>
<text text-anchor="start" x="4325" y="-6773.3" font-family="Helvetica,sans-Serif" font-size="14.00">
registrar_roles
</text>
<text text-anchor="start" x="4507" y="-6773.3" font-family="Helvetica,sans-Serif" font-size="14.00">
</text>
<text text-anchor="start" x="4515" y="-6773.3" font-family="Helvetica,sans-Serif" font-size="14.00">
"hstore" not null
</text>
<polygon fill="none" stroke="#888888" points="4322,-6767 4322,-6940 4614,-6940 4614,-6767 4322,-6767" />
</g>
</g>
</svg>
@ -13983,6 +14059,113 @@ td.section {
</tbody>
</table>
<p>&nbsp;</p>
<table>
<caption style="background-color: #EBCEF2;"><span id="user_f2216f01" class="caption_name">public."User"</span> <span class="caption_description">[table]</span>
</caption>
<tbody>
<tr>
<td class="spacer"></td>
<td class="minwidth"><b><i>id</i></b></td>
<td class="minwidth">int8 not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">email_address</td>
<td class="minwidth">text not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">gaia_id</td>
<td class="minwidth">text not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">registry_lock_password_hash</td>
<td class="minwidth">text</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">registry_lock_password_salt</td>
<td class="minwidth">text</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">global_role</td>
<td class="minwidth">text not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">is_admin</td>
<td class="minwidth">bool not null</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">registrar_roles</td>
<td class="minwidth">"hstore" not null</td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="3" class="section">Primary Key</td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="2" class="name">User_pkey</td>
<td class="description right">[primary key]</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">id</td>
<td class="minwidth"></td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="3" class="section">Indexes</td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="2" class="name">User_pkey</td>
<td class="description right">[unique index]</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">id</td>
<td class="minwidth">ascending</td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="2" class="name">user_email_address_idx</td>
<td class="description right">[non-unique index]</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">email_address</td>
<td class="minwidth">ascending</td>
</tr>
<tr>
<td colspan="3"></td>
</tr>
<tr>
<td colspan="2" class="name">user_gaia_id_idx</td>
<td class="description right">[non-unique index]</td>
</tr>
<tr>
<td class="spacer"></td>
<td class="minwidth">gaia_id</td>
<td class="minwidth">ascending</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<script>svgPanZoom('#erDiagram', { zoomEnabled: true, controlIconsEnabled: true, fit: true, center: true, minZoom: 0.1});</script>
</body>
</html>

View file

@ -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

View file

@ -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);

View file

@ -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: -
--