use `vn`;
DELETE ai from
		`vn`.`agencyIncoming` ai
	LEFT JOIN `vn`.`agencyMode` am ON
		am.id = ai.agencyModeFk
	WHERE am.id IS null;

ALTER TABLE `vn`.`agencyIncoming`
  ADD CONSTRAINT `fk_agencyIncoming_agencyMode`
    FOREIGN KEY (`agencyModeFk`)
    REFERENCES `agencyMode`(`id`)
    ON DELETE CASCADE
    ON UPDATE CASCADE;
