-- AgriFlow — schema part 3: two small additions for features added after
-- your first import (module selection + financial forecast editing).
-- Safe to run once on your existing agriflowco_db database.

ALTER TABLE organizations
  ADD COLUMN enabled_modules TEXT NULL COMMENT 'JSON array of module keys the org has chosen; NULL = all modules enabled';

ALTER TABLE financial_forecasts
  ADD UNIQUE KEY uq_org_month (organization_id, forecast_month);
