expand status column
This commit is contained in:
18
migrations/010_expand_status_column.sql
Normal file
18
migrations/010_expand_status_column.sql
Normal file
@@ -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;
|
||||
Reference in New Issue
Block a user