Fix Error SQLSTATE[42000] In Lumen

Afrimadoni Dinata
1 min readMar 29, 2019

Doing things in Lumen may not be exactly same with Laravel, why? It’s because Lumen is intended to write an API application rather than a complete web application. This differences sometimes lead us to a painful situation when debugging an error.

If you experience an error SQLSTATE[4200] when running php artisan migrate command then all you need to do is adding migrations key into your database config file (database.php), you may have to create the file first if it’s not presented in directory config

system couldn’t find table to store migrations metadata

This is my database config file looks like:

config/database.php

--

--