ALTER TABLE `company_tags` 
DROP FOREIGN KEY `fk_company_tags_company`,
DROP FOREIGN KEY `fk_company_tags_tag`;
ALTER TABLE `company_tags` 
ADD CONSTRAINT `fk_company_tags_company`
  FOREIGN KEY (`id_company`)
  REFERENCES `companies` (`id`)
  ON DELETE CASCADE
  ON UPDATE CASCADE,
ADD CONSTRAINT `fk_company_tags_tag`
  FOREIGN KEY (`id_tag`)
  REFERENCES `tags` (`id`)
  ON DELETE CASCADE
  ON UPDATE CASCADE;