strapi / migration-scripts

Collection of Strapi Migration scripts
58 stars 57 forks source link

fix many to many relation and localization migrate for v3 sql->v4 #103

Open liuyang25 opened 1 year ago

liuyang25 commented 1 year ago
  1. in addRelation, i have debugged the model schema. there is no column field, instead many to many relation will have a dominant field.
  2. add a tool to get all snake_case field of the object, not directly transform it when addRelation, because the v3 sql 's fields are still not snake-cased. it will be used in 'migrateManyToManyRelation'.
  3. line 65 is used for handle localization relation, the model schema have no enough fields to explicate the localization relation, so use this way and add a new handle for it. 'migrateOneToManyRelation'.