title: Laravel foreign_key Incorrect table definition; there can be only one auto column and it must be defined as a key
body: <pre><code>&lt;?php
  
  use Illuminate\Support\Facades\Schema;
  use Illuminate\Database\Schema\Blueprint;
  use Illuminate\Database\Migrations\Migration;
  
  class CreateOrderProductTable extends Migration
  {
      /**
       * Run the migrations.
       *
       * @return void
       */
      public function up()
      {
          Schema::create('order_product', function (Blueprint $table) {
              $table-&gt;bigIncrements('order_id');
              $table-&gt;foreign('order_id')-&gt;references('id')-&gt;on('orders');
              $table-&gt;bigIncrements('product_id');
              $table-&gt;foreign('product_id')-&gt;references('id')-&gt;on('products');
          });
      }
  
      /**
       * Reverse the migrations.
       *
       * @return void
       */
      public function down()
      {
          Schema::dropIfExists('order_product');
      }
  }
  
  
  I expected to create a pivot table, but when I run the "php artisan migrate" it give me this: 
  
      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
  </code></pre>
  
  <p>(SQL: create table <code>order_product</code> (<code>order_id</code> bigint unsigned not null auto_increment primary key, <code>product_id</code> bigint unsigned not null auto_increment primary key) default character set utf8mb4 collate
  'utf8mb4_unicode_ci')</p>
  
  <pre><code>What is wrong with my code? :(
  </code></pre>