Hi Augustin,
This is a very rare bug I had previously before with another customer and validated a solution. Basically as you said it tried to insert a new option with same ID as a one existing before.
Workaround:
- Backup tables CMN_OPTIONS and CMN_OPTION_VALUES
- Run the 2 stored procedures one by one, ensure it's successful:
begin
cmn_option_values_del_sp('E2E_TSV_LINKS_ENABLE');
end;
begin
cmn_options_del_sp('E2E_TSV_LINKS_ENABLE');
end;
- Ensure the wrong values are gone by checking with queries:
select * from cmn_options where id =51762
select * from cmn_option_values where option_id =51762
You should have no results on both queries
- Now readd the value by running the two stored proecdures 1 by 1:
begin
cmn_options_ins_sp ('E2E_TSV_LINKS_ENABLE','Enable TSV links for Export to Excel','Enable TSV links for Export to Excel',1,1,1);
end;
begin
cmn_option_values_ins_sp('E2E_TSV_LINKS_ENABLE',NULL,NULL,1);
end;
- Double check to ensure it has been inserted with a correct id (5000000+) and no 51762 in the system:
select * from cmn_options where option_code = 'E2E_TSV_LINKS_ENABLE'
1 row should be returned with ID >5000000
select * from cmn_options where id =51762
No rows should be returned.
- If it is all correct, proceed with the upgrade as usual.
- Consider using this procedure proactively for all your other environments, since all of them will have the issue.
I hope this helps - please let me know how it goes.
Thank you -Nika