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

treadnought's avatar

Local migration rollbacks need to be recognized by production server

I have an app that I've been successfully deploying via Forge. I added a Livewire component that works on my local WSL setup. Deployment via Forge seems to work, but accessing the app gives a 500 error. Removing the new Livewire component gets rid of the error on the production server, but there's no way to find out what's wrong.

How can I debug on the production server?

0 likes
6 replies
CorvS's avatar

but there's no way to find out what's wrong.

Did you check the logs? It should tell you what's wrong.

treadnought's avatar

It turns out that the production database did not migrate properly. I did a couple of rollbacks locally, but the remote database did not show them.

I manually adjusted the relevant table in the remote db and now it's working. Moral: don't rollback your migrations locally?

CorvS's avatar

How do you expect the production server to know when you do rollbacks locally?

treadnought's avatar

Ok so I'm showing my ignorance here. I had not deployed the site since before adding the new table subject to the rollbacks. I was thinking a local rollback would 'undo' the migration so that all the production server saw was the latest (correct) migration.

I assume that means I have to manually issue rollbacks via the SSH command line on the production server.

CorvS's avatar
CorvS
Best Answer
Level 27

Exactly...or your "rollbacks" are in the form of migrations, then the production server does them upon deployment.

Please or to participate in this conversation.