I tried to rollback a specific migration, I ran php artisan migrate:rollback
, but I forgot to include --step=1
, now all the migration files Ran?
status is No, How do I cancel the rollback? Or is it possible at all to cancel the rollback? I do not want to re-migrate all of the migration files.
CodePudding user response:
migrate:rollback will rollback the last batch of migrations, maybe it only rolled back a few depending on your database.
My suggestion is to backup your database, then run artisan:migrate to see how many migrations get generated.
https://laravel.com/docs/9.x/migrations#rolling-back-migrations
CodePudding user response:
Well, I guess there's really nothing you can do about rollbacked migrations. The best option I got not to lose existing records was to dump the database, run migration, then import the dump file.