When I'm trying to insert a new column into a SQL Server database, I get the following error.
SQLSTATE[23000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot insert duplicate key row in object 'dbo.users' with unique index 'users_api_token_unique'. The duplicate key value is (). (SQL: insert into [users] ([name], [email], [password], [updated_at], [created_at]) values (ibramin salah, [email protected], $2y$10$laopDTNj9Ddzr4cf4a4ctuxYwra5raqm8TXXBS.Rc2wBH2mnf.cJG, 2020-08-07 08:57:49.077, 2020-08-07 08:57:49.077))
Table schema
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name');
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->boolean('adminCreation')->default(0);
$table->rememberToken();
$table->timestamps();
});
I'm using Laravel 5.8 and PHP Version 7.4.4.