There is already an object named 'ref_XYZ' in the database. Could not create constraint. See previous errors.
I am facing an issue with the Content Modules update and this time the error is in the SQL Database configurations. After I updated the columns in the Content Module and clicked on Publish, this error started showing up and its stuck at that point since then.
Attached is a screenshot of the error. I am aware that the issue is with the CURD operations in SQL from Sitefinity but I need to know the best practice / procedure to fix the issue.
I would really appreciate it if someone can help me out on urgent basis.
There is a issue present in Sitefinity 7.0. It can be observed when you make changes that require additional database tables to be created such as adding new language, adding new dynamic type to the same module or new media field.
As a temporary fix we can propose to manually rename the duplicate key.
The name of the key is not important, Sitefinity doesn't rely on it. The important part is that the key should be present in order to improve the performance of the queries.
The issue is fixed in the next Sitefinity release (7.1).
Could you please confirm that renaming the key is working for you?
First of all its Farhan not Farhar :).
Yes I had done the same way actually to over come this SF bug. The version I am using is SF 6.2.
For additional information:
While updating the SiteFinity Content modules in the Admin Module builder, We have to do publish after a set of "CURD" operations. For example, When adding fields, add all fields and hit publish and if deleting- delete the fields and then hit publish but do not do all operations at one go as the SF will be stalled with the operations and the order. The problem with the renamed keys as mentioned. Hence the above error is faced.
Kindly let me know if anything I share was incorrect.
Again thanks for the support, appreciate it.
Yes this is the easiest workaround to this issue and once Sitefinity 7.1 is released, I strongly advise you to perform an upgrade to avoid publishing after each modification using the module builder.