Address issue where users cannot be assigned to groups in production

Add error handling to the user group assignment to gracefully handle missing `created_at` column in production environments, and document the fix.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8a78c07-e900-425c-a577-5b4c5894379d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a8a78c07-e900-425c-a577-5b4c5894379d/yj7Yt4E
This commit is contained in:
michaelschal committed 2025-08-11 19:46:22 +00:00
1 parent 469880b6fe
commit 28b60b6bca
4 files changed
+73 -2

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
-- Fix production user_groups table to add missing created_at column
-- This should be run on your production database
-- Add the missing created_at column to user_groups table
ALTER TABLE user_groups
ADD COLUMN IF NOT EXISTS created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
-- Verify the table structure
\d user_groups;