Lumen/Laravel + sqlite: Only use $table->increments in migrations or it won't auto increment.
Lumen/Laravel + sqlite tip: Only use $table->increments in migrations or it won't auto increment.
I tried all the variations of bigIncrements and tinyIncrements and tinyInteger including adding the unsigned and increments() at the end to no avail.
The only thing that works with sqlite is the increments() method.
You can use tinyInteger by adding a primary key:
$table->tinyInteger($column, true)->unsigned()->primary();
If your code has to work with MySQL and SQLite:
$table->tinyInteger($column, true)->unsigned();
if(DB::connection()->getDriverName() == 'sqlite') $table->primary($column);
Please or to participate in this conversation.