If you work on large scale project, in big team, eventually you’ll have tons of migrations. And, all of them are in one folder. When you open that folder in any IDE, you have to scroll some time, before reaching latest migrations (for fixing something, or something else).
So, this bugged me to the point I had to extend this command, and make few changes. I only changed logic of where new migration file will be created.
With default setting, this is how it works:
If there is less then 10 (number of files can be easily changed) migration files, everything is as it was. If you create 11th migration, new folder names "old" (also can be changed) is created, and first migration is moved to it. So, in your migrations folder you only see latest 10 migrations, and folder with older ones.
If you want to use this code in your console config file:
'commandMap' => array(
'migrate' => array(
'class' => 'application.commands.EnhancedMigrateCommand',
),
),
If you have any remark, please write