Answer the question
In order to leave comments, you need to log in
How do you solve the problem of a large number of migrations?
The project now has a little more than 50 migrations, their number will increase in the future. There was an idea to scatter all this into folders, but artisan does not see them (you will have to run it manually or write a script). Are there other options for organizing migration files?
D' Normalization Sergey Protko Vyacheslav Plisko OnYourLips Dmitry Entelis
Answer the question
In order to leave comments, you need to log in
Created an artisan command that recursively searches for migrations in database/migrations and runs them.
I don't see a problem. I have ~1500 migrations in phinx in one of my projects (since August 2014). Everything works great.
Migrations cover the entire project from the creation of the first table.
I didn’t test how all this behaves on a very large number of migrations, common sense says that if in a year or two it starts to get stupid, it will be possible to dump everything with your hands and create 1 new migration creating an empty base as it is at the moment.
PS Separately, I don’t see the point in some additional organization of the migration structure, because obviously no one rules the already created migrations.
PPS If you really need folder support - open the source and add :) It is unlikely that this will be very difficult to do.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question