Merge Two Or More Modules Into One (V11+)

Max Carrara

I am currently facing somewhat of an inheritance chaos a previous developer from a third party left behind. There are several modules they have added that seem to add their own modifications here and there, but there appears to be no clear structure in how the models and views were added or extended. In short: It's a mess.

I would like to clean up this mess by "merging" some of these modules into one.

For example:

  • Module A defines model example.order

  • Module B extends example.order

  • Module B defines model example.item

    --> New Module contains both model example.order, its extensions, and example.item

Is it possible to do something like that?

The first idea I had was to develop the new module and define all of the required structures and then write a migration script (SQL) to transfer the data to the new module. Is there perhaps an easier way to do something like that?