Commit Graph

10 Commits

Author SHA1 Message Date
e2518916cc chore: update Directus database with video-model associations
- Added video-to-model relationships in sexy_videos_directus_users junction table
- Updated sequence numbers for sexy_videos_directus_users and sexy_videos_models
- Fixed missing model associations for existing videos

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 04:15:33 +01:00
36f48de7ad feat: update database and add Directus schema snapshot
Database Changes (directus.sql):
- Updated with complete gamification system (5 new tables)
- Added original_recording_id field to sexy_recordings for tracking duplicates
- Changed sexy_recordings.duration to NUMERIC(10,2) for decimal milliseconds
- Changed sexy_recordings.tags from text[] to json type
- All 17 achievements seeded (recordings, playback, social, special)
- Includes DROP IF EXISTS statements for safe re-imports
- Flags used: --clean --if-exists --no-owner --no-acl

New File - Directus Schema (schema.yaml):
- Complete Directus v11.12.0 schema snapshot
- All collections, fields, relations, and metadata
- Custom collections: sexy_recordings, sexy_videos, sexy_achievements, etc.
- Gamification tables: sexy_user_points, sexy_user_stats, sexy_user_achievements
- Can be applied with: npx directus schema apply schema.yaml

Export Command:
  docker exec sexy_postgres pg_dump -U sexy -d sexy \
    --no-owner --no-acl --clean --if-exists > directus.sql

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 21:51:14 +01:00
c682494289 fix: directus db revert 2025-10-28 21:35:41 +01:00
5c0b97e180 feat: update database dump with complete gamification system
- Added 5 new tables:
  - sexy_user_points: Point tracking history
  - sexy_achievements: Achievement definitions (17 seeded)
  - sexy_user_achievements: User achievement unlocks
  - sexy_user_stats: Aggregated user statistics and rankings
  - sexy_recording_plays: Playback tracking for gamification

- Updated sexy_recordings schema:
  - duration: INTEGER → NUMERIC(10,2) for decimal milliseconds
  - tags: text[] → json for consistent array handling

- Seeded 17 achievements across categories:
  - Recordings: First Recording, Recording Enthusiast, Prolific Creator, etc.
  - Playback: First Play, Active Player, Completionist
  - Social: First Comment, Conversationalist, Community Voice
  - Special: Early Adopter, Top 10 Rank, Balanced Creator

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 14:07:04 +01:00
b8467dda54 fix: change sexy_recordings duration to numeric type
Change duration column from integer to numeric(10,2) to support
decimal values in milliseconds. Fixes error when saving recordings
with fractional durations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 13:41:16 +01:00
3dcd76f35a feat: update database dump with gamification tables
Add gamification system tables to database dump:
- sexy_user_points: Point transaction log
- sexy_achievements: Achievement definitions (17 seeded)
- sexy_user_achievements: User achievement progress
- sexy_user_stats: Cached user statistics for leaderboard
- sexy_recording_plays: Recording playback tracking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 13:37:23 +01:00
e845ad2625 feat: add sexy_recordings table to database schema
Added missing sexy_recordings table which stores hardware device session recordings. This table is required for the /me dashboard page to load properly.

Table structure:
- id, title, description, slug (unique)
- duration (integer), events (JSONB), device_info (JSONB)
- tags (text array), linked_video (foreign key to sexy_videos)
- status (draft/published/archived), public flag
- user_created/updated, date_created/updated
- Indexes on user_created, status, slug, linked_video, tags (GIN)

This fixes the 5-minute timeout issue on /me page where the recordings endpoint was trying to access a non-existent table.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 12:31:53 +01:00
c4a84ff0fb feat: add missing junction tables for models and videos
Added sexy_model_photos and sexy_videos_models junction tables to support
many-to-many relationships between models/files and videos/models.

This resolves 500 errors on homepage and endpoints that were querying
these missing tables.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 12:09:35 +01:00
12056fa657 feat: add video likes and plays tracking schema
Added missing database tables and columns for video engagement:
- sexy_video_likes: tracks user likes on videos
- sexy_video_plays: tracks video play analytics
- sexy_videos: added likes_count, plays_count, views_count columns

This enables the like/unlike feature and video analytics that were
already implemented in the frontend but missing the database schema.

Tables include proper indexes and foreign key constraints for performance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 11:39:42 +01:00
d6943087f0 feat: sexy 2025-10-26 10:54:01 +01:00