Commit Graph

2 Commits

Author SHA1 Message Date
pezkuwichain 994bec74af feat: Add missing columns to profiles table
Added comprehensive user profile columns to fix 400 Bad Request errors:

Profile Information:
- bio, phone, location, website
- phone_number, recovery_email, recovery_email_verified

User Preferences:
- language (default: 'en')
- theme (default: 'dark')

Notification Settings:
- notifications_email (default: true)
- notifications_push (default: false)
- notifications_sms (default: false)

Security:
- two_factor_enabled (default: false)
- email_verified (for compatibility)

Metadata:
- joined_at (synced from created_at)
- role (default: 'Member')

Indexes:
- Created indexes on phone, language, location for faster queries

This resolves 400 errors when updating profile settings.

Migration Status:  Successfully executed on Supabase

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 04:13:58 +03:00
pezkuwichain e048d53c7f fix: Configure Supabase and add database schema for sign up
- Update VITE_SUPABASE_URL to correct API endpoint
- Update .env.example with correct Supabase project URL
- Add comprehensive database migration script (001_initial_schema.sql)
- Create profiles, admin_roles, wallets, and referral_history tables
- Implement Row Level Security (RLS) on all tables
- Add auto-generation of referral codes
- Add detailed Supabase setup guide (README.md)

This fixes the sign up issue by:
1. Correcting invalid Supabase credentials format
2. Providing SQL schema for required database tables
3. Setting up proper RLS policies for data security

To complete setup:
1. Run supabase/migrations/001_initial_schema.sql in Supabase SQL Editor
2. Add real VITE_SUPABASE_ANON_KEY to .env file
3. Test sign up functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 22:19:22 +03:00