跳至内容
菜单
此问题已终结
1 回复
4067 查看

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!

形象
丢弃
最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
1
5月 25
2444
1
4月 25
3464
1
4月 25
4293
1
4月 25
1776
4
3月 25
6881