Saturday, 20 June 2015

SQLSTATE[42S02]: Base table or view not found : 1146 , laravel 5 errors while using git clone

I just wanted to write this short post to fix this error in  php artisan migrate, there may be a better way to fix this though.

Usually this error maybe given if


  • The migration parameters aren't set properly
  • One of the tables already exists and/or has a column name same as one of that defined in your migration file
  • The table doesn't exists!  

For a quick fix, you might just want to open up a database editor (phpmyadmin etc.) and make the missing table given in the error with a random column name (anything which doesn't exists in the migration file).

Go to the migration file of the table and change Schema::create to Schema::table , what this will do is accept that the table exists already and change the parameters accordingly.