title: 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
body: <pre><code>public function up()
  {
      Schema::create('jadwal_praks', function (Blueprint $table) {
          $table-&gt;increments('id');
          $table-&gt;integer('thnajrn_id', 10)-&gt;unsigned();
          $table-&gt;foreign('thnajrn_id')-&gt;references('id')-&gt;on('tahun_ajarans');
          $table-&gt;integer('prak_id', 10)-&gt;unsigned();
          $table-&gt;foreign('prak_id')-&gt;references('Prak_kode')-&gt;on('mata_praks');
          $table-&gt;integer('hari_id', 10)-&gt;unsigned();
          $table-&gt;foreign('hari_id')-&gt;references('id')-&gt;on('haris');
          $table-&gt;integer('jam_id', 10)-&gt;unsigned();
          $table-&gt;foreign('jam_id')-&gt;references('id')-&gt;on('jams');
          $table-&gt;integer('ruang_id', 10)-&gt;unsigned();
          $table-&gt;foreign('ruang_id')-&gt;references('id')-&gt;on('ruangs');
          $table-&gt;integer('kap_id', 10)-&gt;unsigned();
          $table-&gt;foreign('kap_id')-&gt;references('id')-&gt;on('kapasitas');
  
          $table-&gt;timestamps();
          $table-&gt;rememberToken();
      });
  }
  </code></pre>
  
  <p>After run <code>php artisan migrate</code></p>
  
  <blockquote>
    <p>[Illuminate\Database\QueryException]   SQLSTATE[42000]: Syntax error
    or access violation: 1075 Incorrect table definition; there can be
    only one auto co   lumn and it must be defined as a key (SQL: create
    table <code>jadwal_praks</code> (<code>id</code> int unsigned not null auto_increment<br>
    primary key, <code>thnajrn_id</code> int unsigned not null auto_increment primary
    key, <code>prak_id</code> int unsigned not null auto   _increment primary key,
    <code>hari_id</code> int unsigned not null auto_increment primary key, <code>jam_id</code>
    int unsigned not nul   l auto_increment primary key, <code>ruang_id</code> int
    unsigned not null auto_increment primary key, <code>kap_id</code> int unsigned<br>
    not null auto_increment primary key, <code>created_at</code> timestamp null,
    <code>updated_at</code> timestamp null, <code>remember_token</code> v   archar(100) null)
    default character set utf8 collate utf8_unicode_ci)</p>
  </blockquote>
  
  <p>And this </p>
  
  <blockquote>
    <p>[PDOException]   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</p>
  </blockquote>