I would like to move the table with the elements below.
public function up() { Schema::create('users', function(Blueprint $table) { $table->increments('id'); $table->integer('LoginID', 9)->unsigned(); $table->string('username'); $table->string('email')->unique(); $table->string('password', 60)->unique(); $table->rememberToken(); $table->timestamps(); }); }
However, I continued to deal with the error below. Does anyone know how to make the integer "LoginID" and not the primary key so that I can wrap the table below? Any advice appreciated. Thanks in advance.
[Lighten \ Database \ QueryException]
SQLSTATE [HY000]: general error: 1 users table has more than one primary key (SQL: create a users table (id id integer, not null primary key auto-increment, LoginID integer, not null primary key auto-increment, "username" "varchar not null," email "varchar not null," password "varchar not null," remember_token "varchar null," created_at "date is not null," updated_at "datetime is not null))
source share