import database backup leads to foreign key error
Permalink
import a backup of a database leads to
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?
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?
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.
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.
thanks for the reply.
ok, i have now my whole site locally for testing. in the github thread you mentioned i found this:
i don't know where and how to run this. i think in a terminal on the server and at phpmyadmin in the sql tab?
ok, i have now my whole site locally for testing. in the github thread you mentioned i found this:
i don't know where and how to run this. i think
php ./concrete/bin/concrete5 orm:schema-tool:update --dump-sql
Run SET FOREIGN_KEY_CHECKS=0; Run the SQL that was outputted by the orm:schema-tool Run SET FOREIGN_KEY_CHECKS=1;
https://github.com/concrete5/concrete5/issues/5562...