欢迎各位兄弟 发布技术文章
这里的技术是共享的
alter table drop key "AAA"
alter table drop foreign key "AAA"
ALTER TABLE `erji_user`
ADD PRIMARY KEY (`erji_id`,`user_id`),
ADD KEY `erji_user_user_id_foreign` (`user_id`);
--
-- 限制导出的表
--
--
-- 限制表 `erji_user`
--
ALTER TABLE `erji_user`
ADD CONSTRAINT `erji_user_erji_id_foreign`
FOREIGN KEY (`erji_id`) REFERENCES `erjis` (`erji_id`) ON DELETE CASCADE;
COMMIT;