diff --git a/migrations/010_expand_status_column.sql b/migrations/010_expand_status_column.sql new file mode 100644 index 0000000..ccbf526 --- /dev/null +++ b/migrations/010_expand_status_column.sql @@ -0,0 +1,18 @@ +-- Migration 010: Expand status column to accommodate longer status names +-- The status column was likely VARCHAR(10) which can't fit "In Progress" or "Pending" + +-- Check current column definition +SHOW COLUMNS FROM tickets LIKE 'status'; + +-- Expand the status column to accommodate longer status names +ALTER TABLE tickets +MODIFY COLUMN status VARCHAR(20) NOT NULL DEFAULT 'Open'; + +-- Verify the change +SHOW COLUMNS FROM tickets LIKE 'status'; + +-- Show current status distribution +SELECT status, COUNT(*) as count +FROM tickets +GROUP BY status +ORDER BY status;