操作失败:将SQL脚本应用于数据库时出错。 错误1061:重复的键名'sub_cate_id_idx'
ALTER TABLE `demo_db`.`products`
ADD INDEX `sub_cate_id_idx` (`sub_cate_id` ASC) VISIBLE;
;
ALTER TABLE `demo_db`.`products`
ADD CONSTRAINT `sub_cate_id`
FOREIGN KEY (`sub_cate_id`)
REFERENCES `demo_db`.`sub_category` (`sub_id`)
ON DELETE CASCADE
ON UPDATE CASCADE;