I know this feature has been already added in laravel 5.3, but I am using Laravel 5.1, how can I do it using 5.1 version? I've also searched it on internet, but there's only solution for 5.3. Hope you can help me, and for those who have the same problem.
Asked
Active
Viewed 6,239 times
2 Answers
8
You can just edit the batch
of your migration, update it as last migration. For example, if the batch of the table is 73
and you already have 74
& 75
you can just UPDATE migrations SET batch = 76 WHERE batch = 73
, now your table's batch is 76
, RUN php artisan migrate:rollback
, and there you go.

Blues Clues
- 1,694
- 3
- 31
- 72
-
1Hahaha Though it is late, it is a great idea! Works perfectly! – Mr. J Oct 02 '17 at 09:10
-
Great answer, i thought i can do that with tinker, but migration classes aren't autoloaded and namespaced. – Alexander Kim Jul 16 '18 at 12:51
-
Such an idea! Thank you brother – Hadi Ahmadi Oct 24 '21 at 10:00
0
You can't rollback a specific table even in the latest version (5.4) of laravel. You can only rollback a particular migration. This question was asked recently and there a couple of answers which apply to 5.1 as well.
Rollback a specific migration in laravel5
If you are indeed talking about rolling back a specific migration then do this.

Sandeesh
- 11,486
- 3
- 31
- 42
-
Yah indeed men. But it is just for **L5.3** and up. I'm looking for **L5.1** version. – Mr. J May 26 '17 at 00:52