-- Add 'archived' status to application_plans table
-- This migration updates the check constraint to allow 'archived' status

-- Drop the existing check constraint
ALTER TABLE application_plans DROP CONSTRAINT application_plans_status_check;

-- Add the new check constraint with 'archived' included
ALTER TABLE application_plans ADD CONSTRAINT application_plans_status_check 
CHECK (status IN ('planned', 'in_progress', 'completed', 'cancelled', 'archived'));