feat: Add photoUrl field to User entity for profile photos
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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';
|
||||
Reference in New Issue
Block a user