Files
triqura-ecd/supabase
colinislit 371021d3c0 fix: remove reports created_by FK constraint for prototype
Issue: Foreign key constraint violation when creating reports
- reports.created_by referenced practitioners.id
- Code was storing auth.uid() instead of practitioner.id
- Demo practitioners have user_id: null (no auth link)

Solution (prototype):
- Drop FK constraints on created_by and updated_by
- Store auth user ID directly without constraint
- Added migration: 20251123_fix_reports_created_by_constraint.sql

Note: In production, populate practitioners.user_id and restore
FK constraints for proper data integrity.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:42:46 +01:00
..