I already read Running one specific laravel 4 migration (single file) but this doesn't give me the answer.
I want to know whether there is a way to run the command so that it just executes the next, and just this one migration.
I have got 10 files in my Migrate-Folder. 7 of them are migrated already. Now I found that while I created the 3 new ones and run the command, they are all executed.
The problem is that in the database 'select * from migrations' they show up in one batch and not in separate ones. This means that if I just want to rollback one step, we are back to step 7 and not 9 - what I want.
This is confusing sometimes as I want to rollback one step at a time and not rollback all the steps of one batch.
I know I could move the files in another folder and just leave one to run migrate. Then move the next one and migrate again but this is very inconvenient - what happens if by accident i move and migrate step 10 before step 9.
Anybody knows an answer to this?
It's not enormously ideal, but after running them you can adjust the
batch
values on each migration in the database table to be separate numbers.php artisan migrate:rollback
takes theMAX()
batch value and rolls all of its migrations back.