Cannot add or update a child row: a foreign key constraint fails

Hello community,
I created a production order relative to a BOM.
When I produce the order (any quantity) I got the following error message:

Cannot add or update a child row: a foreign key constraint fails (dolibar_spirits_database.llx_mrp_production, CONSTRAINT fk_mrp_production_stock_movement FOREIGN KEY (fk_stock_movement) REFERENCES llx_stock_mouvement_bak (rowid))

Can someone help me, please.
Thanks.

Making further checks I noticed that I have llx_stock_mouvement_bak table other than than the llx_stock_mouvement table. I don’t understand why it is referencing the bak table instead of the correct one.
Established that the working table is llx_stock_mouvement, can I delete the bak to solve the issue?

[SOLVED]
Finally I found a solution. In phpmyadmin under the menu Structure->Relations view of the table llx_mrp_production I changed the field ‘Table’ relative to the foreign key fk_mrp_production_stock_movement from llx_stock_mouvement_bak to llx_stock_mouvement and it works well.

Glad to see this. How would someone with a DOCKER installation solve this problem? I have a fresh install of 20.0.2 and while I can create users, I cannot create groups (it is greyed out).

Under the user card, when I try to add a group there, I get the same error as you;

Cannot add or update a child row: a foreign key constraint fails (dolidb.llx_usergroup_user, CONSTRAINT fk_usergroup_user_fk_usergroup FOREIGN KEY (fk_usergroup) REFERENCES llx_usergroup (rowid))