jeudi 23 janvier 2020

Laravel migration show "Multiple primary key defined"

My laravel migration is lile below

public function up()
{
    Schema::create('account_main', function (Blueprint $table) {
      $table->increments('user_sn')->primary();
      $table->string('member_username', 20);
      $table->string('login_password', 255);
      $table->integer('login_count')->default('0')->unsigned();
    });
}

When I ran "php artisan migrate", show error "1068 Multiple primary key". Could someone help to find the problem.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire