diff --git a/database/migrations/add_archived_status_to_application_plans.sql b/database/migrations/add_archived_status_to_application_plans.sql new file mode 100644 index 0000000..18fedc5 --- /dev/null +++ b/database/migrations/add_archived_status_to_application_plans.sql @@ -0,0 +1,9 @@ +-- 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')); \ No newline at end of file