Commit Graph
4 Commits
Author SHA1 Message Date
damjan_savic 7ddf3e527d Merge origin/master 2026-01-25 19:46:04 +01:00
damjan_savicandClaude Sonnet 4.5 062e49ca65 auto-claude: subtask-1-2 - Apply migration to Supabase database
Created migration application scripts and comprehensive documentation:
- scripts/apply-migration.js - Automated migration (requires service role key)
- scripts/verify-migration.js - Table verification script
- scripts/test-env.js - Environment diagnostics
- supabase/APPLY_MIGRATION.md - Comprehensive migration guide
- supabase/MIGRATION_INSTRUCTIONS.md - Quick reference

Manual application via Supabase dashboard is recommended approach.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 06:38:29 +01:00
damjan_savic 4c22898d7a auto-claude: subtask-1-1 - Create rate_limits table migration in Supabase 2026-01-25 06:30:46 +01:00
damjan_savicandClaude Opus 4.5 f8fbac8ac6 auto-claude: subtask-4-4 - Create chat_sessions and chat_messages tables in Supabase
Create SQL migration for chatbot database tables:
- chat_sessions: Stores visitor session data with visitor_id, metadata, timestamps
- chat_messages: Stores chat messages with role (user/assistant/system), content
- Proper indexes for visitor lookup and message ordering
- Row Level Security (RLS) enabled with policies for:
  - Service role full access (for server-side API)
  - Visitor-based access via x-visitor-id header (for potential future client-side)
- Trigger for automatic updated_at column on chat_sessions

Also updated ChatSession interface in chat.ts to include updated_at field.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 00:53:55 +01:00