-- Add application_type and seeding_mode to application_plans for seed-aware planning ALTER TABLE application_plans ADD COLUMN IF NOT EXISTS application_type VARCHAR(20) CHECK (application_type IN ('granular','liquid','seed')), ADD COLUMN IF NOT EXISTS seeding_mode VARCHAR(20) CHECK (seeding_mode IN ('overseed','new_seed')); -- Helpful index for querying users' plans by type CREATE INDEX IF NOT EXISTS idx_application_plans_user_type ON application_plans(user_id, application_type); SELECT 'Added application_type and seeding_mode to application_plans' as migration_status;