This PR changes the way that the migrate:run command works so that instead of looping through the modules and running the migrations for that module, it loads all of the migrations and sorts them by filename (and therefore the unix timestamp) so that they run in chronological order. This prevents issues where a migration could rely on a table that hasn't yet been created.
In order to maintain BC, I have added a new method called runFromReferences() which takes an array of references. The original run() method gives the given reference parameter to runFromReferences() in an array
This PR changes the way that the
migrate:run
command works so that instead of looping through the modules and running the migrations for that module, it loads all of the migrations and sorts them by filename (and therefore the unix timestamp) so that they run in chronological order. This prevents issues where a migration could rely on a table that hasn't yet been created.In order to maintain BC, I have added a new method called
runFromReferences()
which takes an array of references. The originalrun()
method gives the given reference parameter torunFromReferences()
in an array