You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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?
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.
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.
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: