Support the ongoing development of Laravel.io →
posted 8 years ago
Database
Last updated 2 years ago.
0

Skip the :refresh part. That's only for completely rebuilding the database from scratch (so deleting everything and migrating again).

Usually you make a change in a new migration (so make:migration) in the up() function and revert it in the down function. So if you add the column test in up() you make sure to delete the column test in down() again. When you have added all your changes you run

php artisan migrate

If you have more changes to make you add another migration (so you do the whole process again).

0

Sign in to participate in this thread!

Eventy

Your banner here too?

vielhuber vielhuber Joined 30 Sep 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.