I have made all integers unsigned but I still get the error. What do I need to change?
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFacebook extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('facebook', function($table)
{
$table->increments('id');
$table->integer('user_id')->unsigned();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade');
$table->timestamps();
$table->string('username', 255);
$table->bigInteger('uid', 20)->unsigned();
$table->string('access_token', 255);
$table->string('access_token_secret', 255);
$table->string('photoURL', 255);
$table->string('profileURL', 255);
$table->string('firstName', 255);
$table->string('lastName', 255);
$table->string('gender', 255);
$table->string('age', 20);
$table->integer('birthDay')->unsigned();
$table->integer('birthMonth')->unsigned();
$table->integer('birthYear')->unsigned();
$table->string('email', 255);
$table->string('phone', 30);
$table->string('address', 255);
$table->string('country', 100);
$table->string('region', 100);
$table->string('city', 100);
$table->string('zip', 20);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('facebook');
}
}
SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be de fined as a key
Thank you.