space-game/supabase/migrations
Michael Mainguy 9440be3251 Add level change history system with database trigger
- Create level_history table storing previous and new state snapshots
- Add trigger that automatically logs meaningful changes to levels
- Track change_type: update, submitted, published, rejected
- RLS policies for user and admin access to history
- Add RPC functions for querying history and entries
- Set user context in save_level_by_token for proper attribution

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-09 07:46:31 -06:00
..
001_cloud_levels.sql Migrate to cloud-only level system using Supabase 2025-11-28 17:26:24 -06:00
002_user_mapping.sql Migrate to cloud-only level system using Supabase 2025-11-28 17:26:24 -06:00
003_leaderboard_user_mapping.sql Migrate to cloud-only level system using Supabase 2025-11-28 17:26:24 -06:00
004_admins_use_internal_id.sql Add level editor for superadmins 2025-12-01 19:57:48 -06:00
005_user_tokens.sql Add level change history system with database trigger 2025-12-09 07:46:31 -06:00
006_level_history.sql Add level change history system with database trigger 2025-12-09 07:46:31 -06:00