title: SQLSTATE[23000]: Integrity constraint violation: 1062
body: <pre><code>User::updateOrCreate([
      'identifier' =&gt; $user-&gt;id,
      'username' =&gt; $user-&gt;nickname,
      'name' =&gt; $user-&gt;name,
      'avatar' =&gt; $user-&gt;avatar,
      'visibility' =&gt; $user-&gt;visibility,
      'api_token' =&gt; Uuid::generate()
  ]);
  </code></pre>
  
  <p>And my migration:</p>
  
  <pre><code>Schema::create('users', function (Blueprint $table) {
      $table-&gt;increments('id');
      $table-&gt;integer('identifier')-&gt;unique();
      $table-&gt;string('username')-&gt;unique();
      $table-&gt;string('name');
      $table-&gt;string('avatar');
      $table-&gt;string('trade')-&gt;nullable();
      $table-&gt;decimal('funds')-&gt;default(0);
      $table-&gt;enum('visibility', [1, 2, 3]);
      $table-&gt;uuid('api_token');
      $table-&gt;timestamps();
  });
  </code></pre>
  
  <p>But results in a QueryException :( </p>
  
  <blockquote>
    <p>SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
    '76561198364059468' for key 'users_identifier_unique'</p>
  </blockquote>