-- Migration: 002_fix_foreign_key_constraint.sql
-- Description: Remove foreign key constraint on project_id since projects table doesn't exist
-- Date: 2024-09-22

-- Drop the foreign key constraint on project_id
ALTER TABLE business_context_responses 
DROP CONSTRAINT IF EXISTS business_context_responses_project_id_fkey;

-- Make project_id nullable since it's just a reference field now
ALTER TABLE business_context_responses 
ALTER COLUMN project_id DROP NOT NULL;

-- Add a comment to clarify the field usage
COMMENT ON COLUMN business_context_responses.project_id IS 'Template/Project identifier - not a foreign key constraint';
