migration-tool
migration-tool copied to clipboard
Migrating Relations Fails - Request failed with status code 400
The migration was often failing prior to the migrating of the relations, but after learning that it was caused by existing users as well as tokens expiring, I have gotten to the point where the migrating of relations fails. Although this sucks, it's progress. I now need to understand how to resolve the failed migration of relations.
However, it is difficult to debug. Here is what I have to work with:
Feedback from Migration Tool:
` ✔ Saving Relations context
✖ Migrating Relations
→ Request failed with status code 400
Saving Relations context
Migrating Data
Save final context
Error: Request failed with status code 400`
Feedback from Directus Docker instance:
`23:49:51 ✨ request completed POST 200 /relations 62ms
23:49:51 ✨ request completed POST 200 /relations 70ms 23:49:51 ✨ request completed POST 200 /relations 115ms 23:49:51 ✨ request completed POST 400 /relations 59ms`
I am not sure how to debug any further with just this information. I am unable to know what the issue is.
However, I have attempted to recreate the POST via Postman and notice there is not error. It seems to run fine and returns a schema by the looks of it.
Any help to making progress in resolving this would be much appreciated.
Something I noticed separately in the Directus Docker instance is that when I try delete a collection via Data Model that specifically has a junction collection I get the following error:
Unexpected Error
drop table 'projects' - ER_ROW_IS_REFERENCED: Cannot delete or update a parent row: a foreign key constraint fails
[INTERNAL_SERVER_ERROR] drop table 'projects' - ER_ROW_IS_REFERENCED: Cannot delete or update a parent row: a foreign key constraint fails
This does not happen when deleting a collection which does not have an associated junction collection. I am not sure if this perhaps has something to do with the issue above. It could have something to do with the DB.