Skip to Content
Menu
This question has been flagged
1 Reply
3782 Views

Good day,

after removal of a module, i cant install a new module and i get the following message:

The operation cannot be completed: duplicate key value violates unique constraint "res_partner_pkey"

DETAIL:  Key (id)=(113) already exists.


So ive tried to figure out how to fix it including 

ALTER SEQUENCE res_partner_id_seq RESTART WITH 300;


Is there anyone that can possibly tell me what im supposed to check or change to changes it so a new module will start on a different index?


Thank you!

Avatar
Discard
Best Answer

Hi,

Identify the conflict:
You need to determine why there is a conflict with the value 113 in the "id" column. This could be due to a previous record that wasn't properly removed or some other issue. You should find out which record has an "id" of 113.

Resolve the conflict:
Once you've identified the conflicting record, you'll need to decide how to resolve it. You might need to delete the conflicting record if it's no longer needed or update it to have a different "id" value.

Restart the sequence:
If you've deleted the conflicting record and want to start the sequence from a different index, you can use the ALTER SEQUENCE command as you mentioned. For example, if you want to start the sequence from 300, you can execute the  SQL command


Hope it helps

Avatar
Discard
Related Posts Replies Views Activity
1
May 25
1925
1
Apr 25
2990
1
Apr 25
3770
1
Apr 25
1339
4
Mar 25
6243