ALTER TABLE loan_applications
  ADD COLUMN IF NOT EXISTS asca_id integer REFERENCES ascas(id);

CREATE INDEX IF NOT EXISTS loan_apps_asca_status_created_idx
  ON loan_applications (asca_id, status, created_at);
