jacquestvanzuydam / laravel-firebird

Firebird Illuminate package for Laravel 5
63 stars 93 forks source link

Laravel migration alter table #64

Closed bonevbb closed 6 years ago

bonevbb commented 6 years ago

Hello, I have a problem with migration for adding a new column to the database. When I try to add new column:

Schema::table('table_name', function (Blueprint $table) { $table->integer('column_name'); });

migration executed, but the column missing in the database. How can I resolve this?

thearyanahmed commented 6 years ago

@bonevbb you can do this in a few different way,

  1. In development,you can user 'php artisan migrate:reset' to reset the database migrations and then run php artisan migrate to migrate again
  2. Or use 'php artisan migrate:refresh', does the same thing but after resetting automatically migrates with new schema (if changed) .

You might need to clear the cache with 'php artisan config:cache'

jacquestvanzuydam commented 6 years ago

Marking as resolved as there has been no further feedback.