When I try to migrate my Strapi v3 to v4, some many to many relations doesn't going right, after debug the code I found an issue.
Required System information
Node.js version: 16.19.0
NPM version: 8.19.3
Strapi version: 4
Database: PG
Operating system: any
Is your project Javascript or Typescript: Javascript
Describe the bug
So in script v3-sql-v4-sql in the below part o code, the verification is incorrect.
Many to many relations doesn't has a column to relate, they has it's own table to make the relations. (I know in Strapi V4 all relations has it's own table, but if in migration the relation it's doesn't identified as many to many your data is gonna be wrong)
Bug report
When I try to migrate my Strapi v3 to v4, some many to many relations doesn't going right, after debug the code I found an issue.
Required System information
Describe the bug
So in script
v3-sql-v4-sql
in the below part o code, the verification is incorrect. Many to many relations doesn't has a column to relate, they has it's own table to make the relations. (I know in Strapi V4 all relations has it's own table, but if in migration the relation it's doesn't identified as many to many your data is gonna be wrong)The part of code here
So, to fix it locally I do:
if (value.column)
>>>if (!value.column) ...
Steps to reproduce the behavior
1 - Strapi V3 with PG 2 - Has many to many relations in strapi V3 3 - Do the steps of migration described in https://github.com/strapi/migration-scripts
Expected behavior
Your many to many relations gonna be empty.
Screenshots
Additional context
Maybe can be related with this other issue