ALTER TABLE `sites` ADD IF NOT EXISTS `domain_id` INT(11) UNSIGNED NULL DEFAULT NULL AFTER `site_id`;
UPDATE `sites` SET `domain_id`=1;
ALTER TABLE `sites` ADD CONSTRAINT `sites_domain_id` FOREIGN KEY (`domain_id`) REFERENCES `domains` (`domain_id`) ON DELETE RESTRICT ON UPDATE CASCADE;
