Running migration one by one on Laravel 5.5

Programming


Sometimes big projects require running migrations one by one. This helps to prevent memory limit exhaust if you run a big amount of migrations. As we can see, Laravel doesn’t provide this solution. By default, it runs all migrations that are stored in its migrations folder. I’ve created a package that solves this problem (On Github: https://github.com/ukiedev/laravel-migration-extended).


To add this package:

composer require ukiedev/laravel-migration-extended

Now you can use command php artisan migrate_extended --first and it’ll run the only first migration.


Comments