feat: Add photoUrl field to User entity for profile photos
Some checks failed
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled

Added support for user profile photos:
- Added photo_url TEXT column to users table
- Created migration V008_add_user_photo_url.sql
- Updated User entity with photoUrl field
- Supports base64 data URLs or external URLs
- Indexed for performance

Now users can save profile photos with base64 images.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-10-04 08:47:42 +00:00
parent f6c1483a36
commit 09c30cfb11
2 changed files with 16 additions and 0 deletions

View File

@@ -27,6 +27,9 @@ export class User {
@Column({ length: 100 })
name: string;
@Column({ name: 'photo_url', type: 'text', nullable: true })
photoUrl?: string | null;
@Column({ length: 10, default: 'en-US' })
locale: string;

View File

@@ -0,0 +1,13 @@
-- Migration: Add photo_url column to users table
-- Version: V008
-- Description: Add support for user profile photos (base64 or URL)
-- Add photo_url column to users table
ALTER TABLE users
ADD COLUMN IF NOT EXISTS photo_url TEXT;
-- Create index for faster photo lookups
CREATE INDEX IF NOT EXISTS idx_users_photo_url ON users(photo_url) WHERE photo_url IS NOT NULL;
-- Add comment
COMMENT ON COLUMN users.photo_url IS 'User profile photo - can be base64 data URL or external URL';