Closed peksi closed 1 year ago
Having the same issue here!
Quick fix for this:
I think the actual issue here is not related to migration-scripts but the Codemods. That table should be generated first time you run strapi develop in V4 - with the rest of the schema, and it seems like that's not the case.
My guess here is migration script simply doesn't find the corresponding table and it skips the migration of data. Maybe @derrickmehaffy will know more about this.
I can confirm this issue, the problem is codemods related.
What I did to reproduce:
I've created a PR for this which should properly migrate components with relations in them. Could you all test to see if that's the case (you'll still need to run the data migration scripts to get the data moved over properly though)
Bug report
Hello and thanks for the hard work with the migration scripts! This is my first PR so let me know in case there is something unclear. Also steps 5. and 8. are something that could raise another issue, but I think that the most critical and valuable thing to solve is the described issue.
Required System information
Describe the bug
Component field relations are dissappearing during the migration process
Steps to reproduce the behavior
npx create-strapi-app@3.5.1 reproductible-relation-error
Cannot read property 'fields' of null
erroradmin_permissions
change thenull
fields to{}
in the columnproperties
Expected behavior
Component relations should migrate to v4
Screenshots
To visualize the collections:
V3 API returns:
V4 API returns:
V3 database structure seems to show the components_element_stores__tools
but the V4 seems to have discarded it
Code snippets
-
Additional context
I'm happy to provide the v3 and v4 databases if needed