migration-scripts
migration-scripts copied to clipboard
fix many to many relation and localization migrate for v3 sql->v4
- in addRelation, i have debugged the model schema. there is no column field, instead many to many relation will have a dominant field.
- 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'.
- 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'.