Answer the question
In order to leave comments, you need to log in
How to roll back a certain minration in laravel 5?
Hi all.
Tell me how in laravel 5 + you can roll back a specific migration?
php artisan migrate:rollback //откат последней миграции
php artisan migrate:reset //откат всех миграций
php artisan migrate:rollback create_users_table //Пробовал вот такой способ не получилось
Answer the question
In order to leave comments, you need to log in
you can't roll back a random migration from the middle of a project.
Only all/one/several from the end. (Laravel 5.3 added rollback of multiple)
Get used to writing as if migrations cannot be rolled back at all. If you need to fix something, then create a new migration that cancels the changes of the previous one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question