title: SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition;
body: <p><strong>Migration File</strong></p>
  
  <pre class="lang-php prettyprint-override"><code>$table-&gt;increments('id');
  $table-&gt;foreign('user_id')-&gt;references('id')-&gt;on('users');
  $table-&gt;foreign('band_id')-&gt;references('id')-&gt;on('bands');
  $table-&gt;foreign('genre_id')-&gt;references('id')-&gt;on('genres');
  $table-&gt;foreign('cate_id')-&gt;references('id')-&gt;on('cates');
  $table-&gt;foreign('type_id')-&gt;references('id')-&gt;on('types');
  $table-&gt;integer('status');
  $table-&gt;date('date');
  $table-&gt;time('time');
  $table-&gt;decimal('price');
  $table-&gt;tinyIncrements('instrument');
  $table-&gt;string('instrument_detail',255);
  $table-&gt;timestamps();
  </code></pre>
  
  <p>After run php artisan migrate</p>
  
  <blockquote>
    <p>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 (SQL: create table <code>bookings</code> (<code>id</code> int unsigned not
    null auto_increment primary key, <code>status</code> int not null, <code>date</code>
    date not null, <code>time</code> time not null, <code>price</code> decimal(8, 2) not null,
    <code>instrument</code> tinyint unsigned not null auto_increment primary key,
    <code>instrument_detail</code> varchar(255) not null, <code>created_at</code> timestamp
    null, <code>updated_at</code> timestamp null) default character      set utf8mb4
    collate utf8mb4_unicode_ci)</p>
  </blockquote>
  
  <p>And this below</p>
  
  <blockquote>
    <p>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>