Vote count:
0
When trying to run the following migration:
Schema::create('languages', function(Blueprint $table){
$table->increments('id');
$table->string('lang', 10);
$table->string('name', 50);
$table->integer('active', 2);
$table->timestamps();
});
I get the following error:
there can be only one auto column and it must be defined as a key
But laravel's documentation states: $table->increments('id'); Incrementing ID to the table (primary key)
Any idea how handle this? Thanks in advance!
asked 1 min ago
Laravel Migration incorrect table definition
Aucun commentaire:
Enregistrer un commentaire