Sunday, September 11, 2016

Laravel 5.3 and Migration

After running this command

php artisan make:migration create_nerds_table --table=nerds --create

I started modifying the generated file to complete the database then ran this

php artisan migrate

and unfortunately, it was giving this error.


After comparing notes (this and another project which ran successful - still in progress), I noticed the difference in the migration file.

The "make:migration" command generated a migration file that uses "Schema::table". The command "php artisan migrate" worked after changing the said part to "Schema::create".

Hope this helps. The environment is on VMware running Ubuntu 14.04 LTS with Apache, PHP5.x, and MariaDB.



No comments:

Post a Comment