Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

siusiak1000's avatar

How to undo a rolledback?

Hey. I wanted to delete one migration. I removed it manually. Then I made php artisan migration: rollback. At the moment, there is nothing in my database. How can I migrate? I will add that php artisan migrate does not work.

I used the rolledback after using it

composer dump-autoload
In Connection.php line 664:
                                                                                                                                                  
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'name_project.settings' doesn't exist (SQL: select * from `settings` limit 1)  
                                                                                                                                                  

In Connection.php line 326:
                                                                                                          
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'name_project.settings' doesn't exist  
                                                                                                          

My database has become empty.

0 likes
1 reply
PatrickSJ's avatar

Nothing in your database? Does that include the migrations table? Because if that table is there then you need to remove the entry corresponding to the manually deleted table as well.

Also, production or local? If local php artisan migrate:fresh to wipe everything and re-migrate.

Please or to participate in this conversation.