I have a working Laravel app, I needed to update a Model and add a new column to the database. In order to do this I added the following code to the database/migrations/table.php file:
Schema::table('client', function (Blueprint $table) {
$table->string('newColumn');
});
When I try to update the database (with php artisan migrate
) I get the message "Nothing to migrate". I noticed that the only way to apply this change is doing php artisan migrate:refresh
or reset, but both commands drop every line on the database.
Is there anyway to update my database columns without dropping everything?