title: PostgreSQL: Unique violation: 7 ERROR: duplicate key value violates unique constraint "users_pkey"
body: <p>I'm using psql in my Laravel App.
  I'm trying to create my user, and I keep getting this error</p>
  <blockquote>
  <p>Unique violation: 7 ERROR: duplicate key value violates unique constraint &quot;users_pkey&quot;</p>
  </blockquote>
  <hr />
  <h1>Here what I did to store my user</h1>
  <pre><code>$user = User::where('account_id','=',$id)-&gt;first();
  $user-&gt;email = $account-&gt;email_address;
  $user-&gt;fb_email = '';
  $user-&gt;tw_email = '';
  $user-&gt;fb_access_token = '';
  $user-&gt;fb_profile_id = '';
  $user-&gt;fb_page_id = '';
  $user-&gt;fb_username = '';
  $user-&gt;save();
  </code></pre>
  <hr />
  <h1>Here is how I created my users table</h1>
  <pre><code>CREATE TABLE &quot;users&quot; (
      &quot;id&quot; serial NOT NULL ,
      &quot;account_id&quot; varchar(255) NOT NULL ,
      &quot;email&quot; varchar(255) NOT NULL ,
      &quot;fb_email&quot; varchar(255) NOT NULL ,
      &quot;tw_email&quot; varchar(255) NOT NULL ,
      &quot;created_at&quot; timestamp(0) without time zone,
      &quot;updated_at&quot; timestamp(0) without time zone,
      &quot;fb_access_token&quot; varchar(255) NOT NULL ,
      &quot;fb_profile_id&quot; varchar(255) NOT NULL ,
      &quot;fb_page_id&quot; varchar(255) NOT NULL ,
      &quot;fb_username&quot; varchar(255) NOT NULL ,
      PRIMARY KEY (&quot;id&quot;)
  
  );
  </code></pre>
  <p>Did I do anything that I'm <code>not</code> suppose to?</p>
  <p>What I am having right now used to work when I hook my app with <code>MySQL</code>.</p>
  <p>Any hints / suggestions will mean a lot to me.</p>
  <hr />
  <h1>Screenshot</h1>
  <p><a href="https://i.stack.imgur.com/yemz9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/yemz9.png" alt="enter image description here" /></a></p>