Ive got the error: SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key") when i try to migrate my laravel db .Heres my schema...
Schema::create('estoques', function (Blueprint $table) {
$table->increments('id_loja')->unsigned();
$table->increments('id_produto')->unsigned();
$table->integer('quantidade');
$table->timestamps();
$table->softDeletes();
});
Schema::table('estoques', function($table) {
$table->foreign('id_loja')->references('id')->on('lojas');
$table->foreign('id_produto')->references('id')->on('products');
});
}