📌  相关文章
📜  无法删除或更新父行:外键约束失败( - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:06.948000             🧑  作者: Mango

代码示例2
ALTER TABLE "appointments" DROP FOREIGN KEY "appointments_user_id_foreign";

ALTER TABLE "appointments" ADD CONSTRAINT "appointments_user_id_foreign" FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE;