-
-
Notifications
You must be signed in to change notification settings - Fork 14
foreign key constraint #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
errors: [ |
Hi @boo-code
No, you can't inject DB commands during push. It seems that you are trying to run a migration of schema with existing data. This is related to the schema snapshot of Directus, used by Directus-Sync. |
Destination is completely empty and has no data at all. I should check something in source here where pull was made from? |
If destination database is empty, sync is working. If destination already contains tables (even empty from first sync), sync stops because of foreign key constraints. |
could be related with this issue? |
Syncing stops because of foreign key constraint between two collections. directus-extension-sync shows error in console and crashes.
Solution would be to run "SET FOREIGN_KEY_CHECKS=0;" before pushing to DB, and then "SET FOREIGN_KEY_CHECKS=1;" when push is done. But how to set these additional DB commands in config or directus-extension-sync module itself?
The text was updated successfully, but these errors were encountered: