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

DoubleUp's avatar

Heroku run php artisan migrate without without dropping all data

Hello guys, so I've tried to host my laravel website to Heroku free hosting. The problem I'm facing right now is whenever I want make a change to the database (whether it is altering the columns or adding columns), by running

Heroku run php artisan migrate

It does not change anything and the pgsql error still there, but by running:

Heroku run php artisan migrate:fresh

The error is gone but as well as my data inside the database's table. How can I altering my table without dropping any data? Thank you

0 likes
1 reply

Please or to participate in this conversation.