16

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.

Amit Verma
  • 40,709
  • 21
  • 93
  • 115
henriale
  • 1,012
  • 9
  • 21

2 Answers2

49

I found the solution myself!

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

'migrations' => 'migrations',

henriale
  • 1,012
  • 9
  • 21
6
<?php
return [

    'default' => 'external',
    'migrations' => 'migrations',
    'connections' => [
        // your connections
    ],
];
OrElse
  • 9,709
  • 39
  • 140
  • 253
lorajc
  • 81
  • 1
  • 4