ALTER TABLE `user_likes` DROP FOREIGN KEY `fk_user_likes_company`;
ALTER TABLE `user_likes` ADD CONSTRAINT `fk_user_likes_company` FOREIGN KEY (`id_company`) REFERENCES `companies`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE; 
ALTER TABLE `user_likes` DROP FOREIGN KEY `fk_user_likes_user`;
ALTER TABLE `user_likes` ADD CONSTRAINT `fk_user_likes_user` FOREIGN KEY (`id_user`) REFERENCES `users`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE;
ALTER TABLE `group_companies` DROP FOREIGN KEY `fk_group_companies_company`; 
ALTER TABLE `group_companies` ADD CONSTRAINT `fk_group_companies_company` FOREIGN KEY (`id_company`) REFERENCES `companies`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE; 
ALTER TABLE `group_companies` DROP FOREIGN KEY `fk_group_companies_group`; 
ALTER TABLE `group_companies` ADD CONSTRAINT `fk_group_companies_group` FOREIGN KEY (`id_group`) REFERENCES `groups`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE; 
ALTER TABLE `phones` DROP FOREIGN KEY `company_phone`; 
ALTER TABLE `phones` ADD CONSTRAINT `company_phone` FOREIGN KEY (`id_company`) REFERENCES `companies`(`id`) ON DELETE CASCADE; 