I am new to laravel and have a new 5.2 laravel installation.
I would like to use migrations. Database connection to MySQL setup correctly in .env file.
If I run php artisan migrate I get the message that the migrations table does not exist
I get the same message for: php artisan migration:install
What do I do to create the migrations table correctly?
Nope, none of the documentation or any of those commands work. No matter what I do I get this error message
[Illuminate\Database\QueryException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'My_Database.migrations' doesn't exist (SQL: select * from migrations)
[PDOException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'redpl154_demo.migrations' doesn't exist
So, how do I force it to create the migrations table? It's a MySQL server. Setup in .env and the user that is logging in as full permissions on the database
OK, I restarted the server (Centos 6.7) -- PHP 5.6 -- Laravel 5.2
I get exactly the same error message, basically migrations table not found, so it is not been created for some reason
It is a newly created database and there are no tables in it at all
Also Just run a composer update on your laravel project to get the latest 5.2 laravel update so just incase the is a bug which is unlikely but just to be sure update it
OK, looks to have been solved,
I deleted by laravel installation (it was new and originally installed with composer). I then installed with the laravel command. I had to install the Zip extension to get this to work.
Now, the php artisan migrate function worked creating the migrations, reset_password and users table automatically.
Not sure why all that went down, but that's what happened
Also for posterity, if you're running Laravel on a VM and not just the dev server, the php artisan migrate command needs to be run from within the VM. On vagrant you need to: vagrant ssh -> cd /vagrant -> php artisan migrate. I had the same error being reported when trying to run the migrate command from my local machine.