-- Align application_plans with the nozzle-aware application planning routes.

ALTER TABLE application_plans
ADD COLUMN IF NOT EXISTS nozzle_id INTEGER REFERENCES user_equipment(id);

CREATE INDEX IF NOT EXISTS idx_application_plans_nozzle
  ON application_plans(nozzle_id);
