mercredi 22 juin 2016

Unique violation: 7 ERROR: duplicate key value violates unique constraint "users_pkey"

I'm using psql in my Laravel App. I'm trying to create my user, and I keep getting this error

Unique violation: 7 ERROR: duplicate key value violates unique constraint "users_pkey"


Here what I did

$user = User::where('account_id','=',$id)->first();
$user->email = $account->email_address;
$user->fb_email = '';
$user->tw_email = '';
$user->fb_access_token = '';
$user->fb_profile_id = '';
$user->fb_page_id = '';
$user->fb_username = '';
$user->save();


Did I do anything that I'm not suppose to?

What I am having right now used to work when I hook my app with MySQL.

Any hints / suggestions will mean a lot to me.


Screenshot

enter image description here



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire