[Error Code: 1452, SQL State: 23000] Cannot add or update a child row: a foreign key constraint fails (`workflow`.`act_id_membership`, CONSTRAINT `ACT_FK_MEMB_USER` FOREIGN KEY (`USER_ID_`) REFERENCES `act_id_user` (`ID_`))
sql: INSERT INTO act_id_membership (USER_ID_, GROUP_ID_) VALUES (‘admin‘, ‘1‘);
这个报错提示的意识是:constraint 约束 外键约束导致插入失败
act_id_membership的USER_ID_在act_id_user的ID_里找不到,所以我们应该先插入act_id_user的数据以满足条件。
时间: 2024-10-07 21:02:45