Search code examples
phplaravellumen

No table name set on execute migration in Lumen


I'm facing this error when attempting to run the migration in Lumen Framework:

$ php artisan migrate:install

 [Illuminate\Database\QueryException]                                                                   
  SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '' (SQL: create table ``  
   (`migration` varchar(255) not null, `batch` int not null) default character set utf8 collate utf8_unicode_ci)     

  [PDOException]                                                                   
  SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '' 

And now I have no idea what's going on.

Note that the table that is not being created is the one which controls the migrations at all.


Solution

  • I found the solution myself!

    Just add the name of the table on database config array and it's done!

    'migrations' => 'migrations',