import database backup leads to foreign key error

Permalink
import a backup of a database leads to

SQL-Befehl:
ALTER TABLE `atBoolean`
  ADD CONSTRAINT `FK_5D5F70A9A2A82A5D` FOREIGN KEY (`avID`) REFERENCES `AttributeValues` (`avID`) ON DELETE CASCADE
MySQL meldet: Dokumentation
#1452 - Cannot add or update a child row: a foreign key constraint fails (`shaolinsteyr`.`#sql-af3_8b`, CONSTRAINT `FK_5D5F70A9A2A82A5D` FOREIGN KEY (`avID`) REFERENCES `AttributeValues` (`avID`) ON DELETE CASCADE)


the problem is, i moved my site and i imported the databese with disabled foreign keys. now my site is working, but adding some addons doesn't work. all my database backups are leading to the same error. how can i fix this?

 
JohntheFish replied on at Permalink Reply
JohntheFish
shaolinsteyr1 replied on at Permalink Reply
possibly, but i need help to understand what is actually todo. english is not my first language and more than export and import a database i have never done. if you or someone else can give me a clear step by step tutorial, i would highly appreciate this.
JohntheFish replied on at Permalink Reply
JohntheFish
I don't think there is any clear step by step tutorial. The github issue and related posts are scraps of info that require expertise to interpret and apply. Its not something that can be solved in 15 minutes to write a recipe. The first step would be to look at your database and determine if this actually is the same issue.
shaolinsteyr1 replied on at Permalink Reply
thanks for the reply.

ok, i have now my whole site locally for testing. in the github thread you mentioned i found this:
The best way to do this manually would be to run php ./concrete/bin/concrete5 orm:schema-tool:update --dump-sql then copy the outputted SQL and fire up a mysql client.
    Run SET FOREIGN_KEY_CHECKS=0;
    Run the SQL that was outputted by the orm:schema-tool
    Run SET FOREIGN_KEY_CHECKS=1;

i don't know where and how to run this. i think
php ./concrete/bin/concrete5 orm:schema-tool:update --dump-sql
in a terminal on the server and
Run SET FOREIGN_KEY_CHECKS=0;
    Run the SQL that was outputted by the orm:schema-tool
    Run SET FOREIGN_KEY_CHECKS=1;
at phpmyadmin in the sql tab?