Add Profile model + migration + own-profile endpoints (US-3)
Implements user profile data model and own-profile management endpoints: - Profile and ProfileFavorites models in backend/app/models/profile.py - Migration 0010_add_profile_tables.py (profiles, profile_favorites) - Endpoints in backend/app/routers/profiles.py: - GET /api/profile/me (own profile with default fallback) - PUT /api/profile/me (upsert bio, avatar_asset_id, privacy settings) - GET /api/profile/me/favorites (list favorite world IDs) - PUT /api/profile/me/favorites (replace favorite world IDs) - Fixes values_callable on Asset.asset_type ENUM in app/models/asset.py - Added test_profile.py covering auth, validation, favorites, privacy Independently re-verified: 19/19 new profile tests pass, 258/258 full backend regression suite passes with zero regressions.
This commit is contained in:
@@ -36,6 +36,9 @@ from app.main import app
|
||||
|
||||
TEST_TABLES = (
|
||||
"avatar_loadouts", "assets",
|
||||
# Profile (app/models/profile.py) -- both FK users.id, profile_favorites
|
||||
# additionally FKs worlds.id; list explicitly for clarity/consistency.
|
||||
"profile_favorites", "profiles",
|
||||
# world_chunk_revisions has no FK to worlds/world_chunks (world.md §4.7 /
|
||||
# world_persistence_impl.md §4.3, deliberate -- deleting a chunk or world
|
||||
# must not lose the audit trail), so it won't be cascade-truncated via
|
||||
|
||||
Reference in New Issue
Block a user