Search code examples
phplaravellaravel-artisanmigrate

Laravel:: php artisan migrate is not updating the changes


I want to update my database with one extra column that I forgot so I dropped my database and added that field in create method and also in fillable but whenever I am migrating it. it is taking only previous fields but not adding a new one. what is the problem?


Solution

  • If you migrated, then edit it afterwards, then Laravel wont pick up a new column.

    You have to migrate fresh and seed again:

    php artisan migrate:fresh --seed (don't do this in production)