删除外键
show create table tag; alter table tag drop foreign key tag_ibfk_1; alter table tag drop column category_id;
alter table tag drop foreign key tag_ibfk_3; alter table filter rename to category; alter table category change filter_id category_id INT UNSIGNED NOT NULL AUTO_INCREMENT; alter table tag change filter_id category_id INT UNSIGNED NULL; alter table `tag` add CONSTRAINT `tag_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `category` (`category_id`) ;