Skip to content

Commit 6040ea6

Browse files
committed
Complete Local DB migration with grouped DDL DML seed artifacts, server-side seed APIs, DEV static user ULIDs, guest seed data, and final DB audit - PR_26164_103-109-db-migration-completion
1 parent 7f261c3 commit 6040ea6

122 files changed

Lines changed: 37555 additions & 2367 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

account/create-account.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ <h1>Create Account</h1>
2525
<div class="card">
2626
<div class="card-body content-stack">
2727
<div>
28-
<div class="kicker">Coming Soon</div>
28+
<div class="kicker">Account Access</div>
2929
<h2>Account Creation</h2>
3030
</div>
31-
<p>Account creation will be available with the production auth provider.</p>
31+
<p>Account features are being connected to the production authentication provider.</p>
3232
<div class="action-group">
3333
<a class="btn primary" href="sign-in.html">Back to Sign In</a>
3434
</div>

account/lost-password.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ <h1>Lost Password</h1>
2525
<div class="card">
2626
<div class="card-body content-stack">
2727
<div>
28-
<div class="kicker">Coming Soon</div>
28+
<div class="kicker">Account Access</div>
2929
<h2>Password Reset</h2>
3030
</div>
31-
<p>Password reset will be available with the production auth provider. No reset tokens are stored in this build.</p>
31+
<p>Account features are being connected to the production authentication provider.</p>
3232
<div class="action-group">
3333
<a class="btn primary" href="sign-in.html">Back to Sign In</a>
3434
</div>

account/sign-in.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h2>Welcome Back</h2>
3838
<a class="btn" href="create-account.html" data-login-create-account>Create Account</a>
3939
<a class="btn btn--compact" href="lost-password.html" data-login-lost-password>Lost Password</a>
4040
</div>
41-
<div class="status" role="status" data-login-status>Secure account sign-in is not available in this build.</div>
41+
<div class="status" role="status" data-login-status>Account features are being connected to the production authentication provider.</div>
4242
</form>
4343
<div class="action-group">
4444
<a class="btn btn--compact" href="toolbox/index.html" data-login-continue>Continue Browsing</a>

assets/theme-v2/js/login-session.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,5 @@ if (continueLink) {
4747

4848
form?.addEventListener("submit", (event) => {
4949
event.preventDefault();
50-
setStatus("Secure account sign-in is not available in this build.");
50+
setStatus("Account features are being connected to the production authentication provider.");
5151
});

docs_build/database/ddl/account.sql

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ CREATE TABLE IF NOT EXISTS users (
1919
CONSTRAINT users_auth_identity_unique UNIQUE ("authProvider", "authProviderUserId")
2020
);
2121

22+
CREATE INDEX IF NOT EXISTS idx_users_email ON users (email);
23+
CREATE INDEX IF NOT EXISTS idx_users_createdby ON users ("createdBy");
24+
CREATE INDEX IF NOT EXISTS idx_users_updatedby ON users ("updatedBy");
25+
2226
CREATE TABLE IF NOT EXISTS roles (
2327
key text PRIMARY KEY,
2428
"roleSlug" text NOT NULL UNIQUE,
@@ -32,6 +36,9 @@ CREATE TABLE IF NOT EXISTS roles (
3236
"updatedBy" text NOT NULL REFERENCES users(key)
3337
);
3438

39+
CREATE INDEX IF NOT EXISTS idx_roles_createdby ON roles ("createdBy");
40+
CREATE INDEX IF NOT EXISTS idx_roles_updatedby ON roles ("updatedBy");
41+
3542
CREATE TABLE IF NOT EXISTS user_roles (
3643
key text PRIMARY KEY,
3744
"userKey" text NOT NULL REFERENCES users(key) ON DELETE CASCADE,
@@ -42,3 +49,8 @@ CREATE TABLE IF NOT EXISTS user_roles (
4249
"updatedBy" text NOT NULL REFERENCES users(key),
4350
CONSTRAINT user_roles_user_role_unique UNIQUE ("userKey", "roleKey")
4451
);
52+
53+
CREATE INDEX IF NOT EXISTS idx_user_roles_userkey ON user_roles ("userKey");
54+
CREATE INDEX IF NOT EXISTS idx_user_roles_rolekey ON user_roles ("roleKey");
55+
CREATE INDEX IF NOT EXISTS idx_user_roles_createdby ON user_roles ("createdBy");
56+
CREATE INDEX IF NOT EXISTS idx_user_roles_updatedby ON user_roles ("updatedBy");

docs_build/database/ddl/admin.sql

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
-- Game Foundry Studio DEV database DDL
22
-- Group: Admin
33
-- Ownership: docs_build/database/ddl/admin.sql
4-
-- Runtime Local DB schemas for these tables are currently owned by src/dev-runtime/persistence/mock-db-store.js.
5-
-- This grouped file documents the product/tool ownership boundary until an executable migration PR promotes the table DDL.
6-
-- Owned tables: none active
7-
-- Note: Admin Site Setup owns explicit server-side setup/reseed entry points. No persistent admin table exists in this PR.
8-
9-
-- Server/API layer owns authoritative key generation for records in this group.
4+
-- Target DEV database: gamefoundry_dev
5+
-- Scope: no active persistent Admin tables exist in the Local DB/server API contract yet.
6+
-- Empty-group note: Admin Site Setup owns explicit server-side setup/reseed entry points; no persistent admin table is active.

docs_build/database/ddl/asset.sql

Lines changed: 128 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,133 @@
11
-- Game Foundry Studio DEV database DDL
22
-- Group: Asset
33
-- Ownership: docs_build/database/ddl/asset.sql
4-
-- Runtime Local DB schemas for these tables are currently owned by src/dev-runtime/persistence/mock-db-store.js.
5-
-- This grouped file documents the product/tool ownership boundary until an executable migration PR promotes the table DDL.
4+
-- Target DEV database: gamefoundry_dev
5+
-- Scope: executable grouped table DDL for active Local DB/server API migration.
6+
-- Authoritative key values are generated by the server/API layer unless a later DEV-only seed exception explicitly applies.
67
-- Owned tables: asset_role_definitions, asset_library_items, asset_storage_objects, asset_import_events, asset_validation_items
8+
CREATE TABLE IF NOT EXISTS asset_role_definitions (
9+
key text PRIMARY KEY,
10+
"id" text,
11+
"label" text,
12+
"storageFolder" text,
13+
"extensions" jsonb NOT NULL DEFAULT '[]'::jsonb,
14+
"mimeTypes" jsonb NOT NULL DEFAULT '[]'::jsonb,
15+
"previewBehavior" text,
16+
"uploadEnabled" boolean NOT NULL DEFAULT false,
17+
"inputMode" text,
18+
"usageRoles" jsonb NOT NULL DEFAULT '[]'::jsonb,
19+
"maxSizeBytes" integer NOT NULL DEFAULT 0,
20+
"dbFields" jsonb NOT NULL DEFAULT '[]'::jsonb,
21+
"validationNeeds" jsonb NOT NULL DEFAULT '[]'::jsonb,
22+
"createdAt" timestamptz NOT NULL DEFAULT now(),
23+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
24+
"createdBy" text NOT NULL REFERENCES users(key),
25+
"updatedBy" text NOT NULL REFERENCES users(key)
26+
);
727

8-
-- Server/API layer owns authoritative key generation for records in this group.
28+
CREATE INDEX IF NOT EXISTS idx_asset_role_definitions_createdby ON asset_role_definitions ("createdBy");
29+
CREATE INDEX IF NOT EXISTS idx_asset_role_definitions_updatedby ON asset_role_definitions ("updatedBy");
30+
31+
CREATE TABLE IF NOT EXISTS asset_library_items (
32+
key text PRIMARY KEY,
33+
"id" text,
34+
"gameId" text REFERENCES game_workspace_games(key),
35+
"ownerProjectId" text REFERENCES game_workspace_games(key),
36+
"ownerUserId" text REFERENCES users(key),
37+
"assetRole" text,
38+
"assetRoleLabel" text,
39+
"assetType" text,
40+
"description" text,
41+
"tagKeys" jsonb NOT NULL DEFAULT '[]'::jsonb,
42+
"name" text,
43+
"source" text,
44+
"reference" text,
45+
"fileName" text,
46+
"originalName" text,
47+
"mimeType" text,
48+
"size" integer NOT NULL DEFAULT 0,
49+
"checksum" text,
50+
"storageObjectId" text,
51+
"storedPath" text,
52+
"path" text,
53+
"previewKind" text,
54+
"role" text,
55+
"type" text,
56+
"usage" text,
57+
"status" text,
58+
"createdAt" timestamptz NOT NULL DEFAULT now(),
59+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
60+
"createdBy" text NOT NULL REFERENCES users(key),
61+
"updatedBy" text NOT NULL REFERENCES users(key)
62+
);
63+
64+
CREATE INDEX IF NOT EXISTS idx_asset_library_items_gameid ON asset_library_items ("gameId");
65+
CREATE INDEX IF NOT EXISTS idx_asset_library_items_ownerprojectid ON asset_library_items ("ownerProjectId");
66+
CREATE INDEX IF NOT EXISTS idx_asset_library_items_owneruserid ON asset_library_items ("ownerUserId");
67+
CREATE INDEX IF NOT EXISTS idx_asset_library_items_storageobjectid ON asset_library_items ("storageObjectId");
68+
CREATE INDEX IF NOT EXISTS idx_asset_library_items_createdby ON asset_library_items ("createdBy");
69+
CREATE INDEX IF NOT EXISTS idx_asset_library_items_updatedby ON asset_library_items ("updatedBy");
70+
71+
CREATE TABLE IF NOT EXISTS asset_storage_objects (
72+
key text PRIMARY KEY,
73+
"id" text,
74+
"assetId" text REFERENCES asset_library_items(key),
75+
"gameId" text REFERENCES game_workspace_games(key),
76+
"ownerProjectId" text REFERENCES game_workspace_games(key),
77+
"role" text,
78+
"originalName" text,
79+
"storedPath" text,
80+
"mimeType" text,
81+
"size" integer NOT NULL DEFAULT 0,
82+
"checksum" text,
83+
"status" text,
84+
"createdAt" timestamptz NOT NULL DEFAULT now(),
85+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
86+
"createdBy" text NOT NULL REFERENCES users(key),
87+
"updatedBy" text NOT NULL REFERENCES users(key)
88+
);
89+
90+
CREATE INDEX IF NOT EXISTS idx_asset_storage_objects_assetid ON asset_storage_objects ("assetId");
91+
CREATE INDEX IF NOT EXISTS idx_asset_storage_objects_gameid ON asset_storage_objects ("gameId");
92+
CREATE INDEX IF NOT EXISTS idx_asset_storage_objects_ownerprojectid ON asset_storage_objects ("ownerProjectId");
93+
CREATE INDEX IF NOT EXISTS idx_asset_storage_objects_createdby ON asset_storage_objects ("createdBy");
94+
CREATE INDEX IF NOT EXISTS idx_asset_storage_objects_updatedby ON asset_storage_objects ("updatedBy");
95+
96+
CREATE TABLE IF NOT EXISTS asset_import_events (
97+
key text PRIMARY KEY,
98+
"id" text,
99+
"assetId" text REFERENCES asset_library_items(key),
100+
"gameId" text REFERENCES game_workspace_games(key),
101+
"fileName" text,
102+
"mimeType" text,
103+
"storedPath" text,
104+
"status" text,
105+
"type" text,
106+
"createdAt" timestamptz NOT NULL DEFAULT now(),
107+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
108+
"createdBy" text NOT NULL REFERENCES users(key),
109+
"updatedBy" text NOT NULL REFERENCES users(key)
110+
);
111+
112+
CREATE INDEX IF NOT EXISTS idx_asset_import_events_assetid ON asset_import_events ("assetId");
113+
CREATE INDEX IF NOT EXISTS idx_asset_import_events_gameid ON asset_import_events ("gameId");
114+
CREATE INDEX IF NOT EXISTS idx_asset_import_events_createdby ON asset_import_events ("createdBy");
115+
CREATE INDEX IF NOT EXISTS idx_asset_import_events_updatedby ON asset_import_events ("updatedBy");
116+
117+
CREATE TABLE IF NOT EXISTS asset_validation_items (
118+
key text PRIMARY KEY,
119+
"id" text,
120+
"gameId" text REFERENCES game_workspace_games(key),
121+
"field" text,
122+
"label" text,
123+
"status" text,
124+
"action" text,
125+
"createdAt" timestamptz NOT NULL DEFAULT now(),
126+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
127+
"createdBy" text NOT NULL REFERENCES users(key),
128+
"updatedBy" text NOT NULL REFERENCES users(key)
129+
);
130+
131+
CREATE INDEX IF NOT EXISTS idx_asset_validation_items_gameid ON asset_validation_items ("gameId");
132+
CREATE INDEX IF NOT EXISTS idx_asset_validation_items_createdby ON asset_validation_items ("createdBy");
133+
CREATE INDEX IF NOT EXISTS idx_asset_validation_items_updatedby ON asset_validation_items ("updatedBy");
Lines changed: 90 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,95 @@
11
-- Game Foundry Studio DEV database DDL
22
-- Group: Controls
33
-- Ownership: docs_build/database/ddl/controls.sql
4-
-- Runtime Local DB schemas for these tables are currently owned by src/dev-runtime/persistence/mock-db-store.js.
5-
-- This grouped file documents the product/tool ownership boundary until an executable migration PR promotes the table DDL.
4+
-- Target DEV database: gamefoundry_dev
5+
-- Scope: executable grouped table DDL for active Local DB/server API migration.
6+
-- Authoritative key values are generated by the server/API layer unless a later DEV-only seed exception explicitly applies.
67
-- Owned tables: game_input_mappings, player_controller_profiles, player_input_device_selections, input_custom_action_records
8+
CREATE TABLE IF NOT EXISTS game_input_mappings (
9+
key text PRIMARY KEY,
10+
"id" text,
11+
"gameId" text REFERENCES game_workspace_games(key),
12+
"objectKey" text REFERENCES object_definition_records(key),
13+
"objectName" text,
14+
"gameAction" text,
15+
"gameActionLabel" text,
16+
"usageLabel" text,
17+
"normalizedInput" text,
18+
"inputFamily" text,
19+
"eventD" boolean NOT NULL DEFAULT false,
20+
"eventH" boolean NOT NULL DEFAULT false,
21+
"eventU" boolean NOT NULL DEFAULT false,
22+
"eventDC" boolean NOT NULL DEFAULT false,
23+
"eventDrag" boolean NOT NULL DEFAULT false,
24+
"eventAxis" boolean NOT NULL DEFAULT false,
25+
"enabled" boolean NOT NULL DEFAULT true,
26+
"state" text,
27+
"recordOrder" integer NOT NULL DEFAULT 0,
28+
"createdAt" timestamptz NOT NULL DEFAULT now(),
29+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
30+
"createdBy" text NOT NULL REFERENCES users(key),
31+
"updatedBy" text NOT NULL REFERENCES users(key)
32+
);
733

8-
-- Server/API layer owns authoritative key generation for records in this group.
34+
CREATE INDEX IF NOT EXISTS idx_game_input_mappings_gameid ON game_input_mappings ("gameId");
35+
CREATE INDEX IF NOT EXISTS idx_game_input_mappings_objectkey ON game_input_mappings ("objectKey");
36+
CREATE INDEX IF NOT EXISTS idx_game_input_mappings_createdby ON game_input_mappings ("createdBy");
37+
CREATE INDEX IF NOT EXISTS idx_game_input_mappings_updatedby ON game_input_mappings ("updatedBy");
38+
39+
CREATE TABLE IF NOT EXISTS player_controller_profiles (
40+
key text PRIMARY KEY,
41+
"id" text,
42+
"playerId" text REFERENCES users(key),
43+
"deviceType" text,
44+
"controllerName" text,
45+
"controllerId" text,
46+
"profileName" text,
47+
"inputs" jsonb NOT NULL DEFAULT '[]'::jsonb,
48+
"inputMappings" jsonb NOT NULL DEFAULT '[]'::jsonb,
49+
"recordOrder" integer NOT NULL DEFAULT 0,
50+
"createdAt" timestamptz NOT NULL DEFAULT now(),
51+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
52+
"createdBy" text NOT NULL REFERENCES users(key),
53+
"updatedBy" text NOT NULL REFERENCES users(key)
54+
);
55+
56+
CREATE INDEX IF NOT EXISTS idx_player_controller_profiles_playerid ON player_controller_profiles ("playerId");
57+
CREATE INDEX IF NOT EXISTS idx_player_controller_profiles_createdby ON player_controller_profiles ("createdBy");
58+
CREATE INDEX IF NOT EXISTS idx_player_controller_profiles_updatedby ON player_controller_profiles ("updatedBy");
59+
60+
CREATE TABLE IF NOT EXISTS player_input_device_selections (
61+
key text PRIMARY KEY,
62+
"id" text,
63+
"playerId" text REFERENCES users(key),
64+
"selectionKey" text,
65+
"selectionType" text,
66+
"deviceType" text,
67+
"controllerId" text,
68+
"profileId" text REFERENCES player_controller_profiles(key),
69+
"label" text,
70+
"createdAt" timestamptz NOT NULL DEFAULT now(),
71+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
72+
"createdBy" text NOT NULL REFERENCES users(key),
73+
"updatedBy" text NOT NULL REFERENCES users(key)
74+
);
75+
76+
CREATE INDEX IF NOT EXISTS idx_player_input_device_selections_playerid ON player_input_device_selections ("playerId");
77+
CREATE INDEX IF NOT EXISTS idx_player_input_device_selections_profileid ON player_input_device_selections ("profileId");
78+
CREATE INDEX IF NOT EXISTS idx_player_input_device_selections_createdby ON player_input_device_selections ("createdBy");
79+
CREATE INDEX IF NOT EXISTS idx_player_input_device_selections_updatedby ON player_input_device_selections ("updatedBy");
80+
81+
CREATE TABLE IF NOT EXISTS input_custom_action_records (
82+
key text PRIMARY KEY,
83+
"id" text,
84+
"gameId" text REFERENCES game_workspace_games(key),
85+
"label" text,
86+
"recordOrder" integer NOT NULL DEFAULT 0,
87+
"createdAt" timestamptz NOT NULL DEFAULT now(),
88+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
89+
"createdBy" text NOT NULL REFERENCES users(key),
90+
"updatedBy" text NOT NULL REFERENCES users(key)
91+
);
92+
93+
CREATE INDEX IF NOT EXISTS idx_input_custom_action_records_gameid ON input_custom_action_records ("gameId");
94+
CREATE INDEX IF NOT EXISTS idx_input_custom_action_records_createdby ON input_custom_action_records ("createdBy");
95+
CREATE INDEX IF NOT EXISTS idx_input_custom_action_records_updatedby ON input_custom_action_records ("updatedBy");
Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,38 @@
11
-- Game Foundry Studio DEV database DDL
22
-- Group: Game Configuration
33
-- Ownership: docs_build/database/ddl/game-configuration.sql
4-
-- Runtime Local DB schemas for these tables are currently owned by src/dev-runtime/persistence/mock-db-store.js.
5-
-- This grouped file documents the product/tool ownership boundary until an executable migration PR promotes the table DDL.
4+
-- Target DEV database: gamefoundry_dev
5+
-- Scope: executable grouped table DDL for active Local DB/server API migration.
6+
-- Authoritative key values are generated by the server/API layer unless a later DEV-only seed exception explicitly applies.
67
-- Owned tables: game_configuration_records, game_configuration_validation_items
8+
CREATE TABLE IF NOT EXISTS game_configuration_records (
9+
key text PRIMARY KEY,
10+
"gameKey" text REFERENCES game_workspace_games(key),
11+
"status" text,
12+
"summary" text,
13+
"playerMode" text,
14+
"createdAt" timestamptz NOT NULL DEFAULT now(),
15+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
16+
"createdBy" text NOT NULL REFERENCES users(key),
17+
"updatedBy" text NOT NULL REFERENCES users(key)
18+
);
719

8-
-- Server/API layer owns authoritative key generation for records in this group.
20+
CREATE INDEX IF NOT EXISTS idx_game_configuration_records_gamekey ON game_configuration_records ("gameKey");
21+
CREATE INDEX IF NOT EXISTS idx_game_configuration_records_createdby ON game_configuration_records ("createdBy");
22+
CREATE INDEX IF NOT EXISTS idx_game_configuration_records_updatedby ON game_configuration_records ("updatedBy");
23+
24+
CREATE TABLE IF NOT EXISTS game_configuration_validation_items (
25+
key text PRIMARY KEY,
26+
"gameKey" text REFERENCES game_workspace_games(key),
27+
"label" text,
28+
"status" text,
29+
"action" text,
30+
"createdAt" timestamptz NOT NULL DEFAULT now(),
31+
"updatedAt" timestamptz NOT NULL DEFAULT now(),
32+
"createdBy" text NOT NULL REFERENCES users(key),
33+
"updatedBy" text NOT NULL REFERENCES users(key)
34+
);
35+
36+
CREATE INDEX IF NOT EXISTS idx_game_configuration_validation_items_gamekey ON game_configuration_validation_items ("gameKey");
37+
CREATE INDEX IF NOT EXISTS idx_game_configuration_validation_items_createdby ON game_configuration_validation_items ("createdBy");
38+
CREATE INDEX IF NOT EXISTS idx_game_configuration_validation_items_updatedby ON game_configuration_validation_items ("updatedBy");

0 commit comments

Comments
 (0)