-- Ekspertizler tablosuna alıcı ve satıcı için il/ilçe alanları ekler
ALTER TABLE `ekspertizler`
  ADD `alici_il_id` int(11) unsigned NULL AFTER `satici_id`,
  ADD `alici_ilce_id` int(11) unsigned NULL AFTER `alici_il_id`,
  ADD `satici_il_id` int(11) unsigned NULL AFTER `alici_ilce_id`,
  ADD `satici_ilce_id` int(11) unsigned NULL AFTER `satici_il_id`,
  ADD `alici_referans_kaynagi` varchar(50) NULL AFTER `alici_ilce_id`,
  ADD `satici_referans_kaynagi` varchar(50) NULL AFTER `satici_ilce_id`,
  ADD CONSTRAINT `fk_ekspertizler_alici_il` FOREIGN KEY (`alici_il_id`) REFERENCES `iller` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_ekspertizler_alici_ilce` FOREIGN KEY (`alici_ilce_id`) REFERENCES `ilceler` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_ekspertizler_satici_il` FOREIGN KEY (`satici_il_id`) REFERENCES `iller` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_ekspertizler_satici_ilce` FOREIGN KEY (`satici_ilce_id`) REFERENCES `ilceler` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
