Cannot DROP CONSTRAINT in SQL Server

52 Views Asked by At

I am trying to remove a constraint as I am getting the following message whilst trying to upgrade a website:

enter image description here

I have located the offending constraint in the database:

enter image description here

I have tried dropping the constraint using the following query in SSMS:

USE [Docs10]
GO

/****** Object:  Index [IX_umbracoPropertyData_VersionId]    Script Date: 21/03/2024 11:02:13 ******/
ALTER TABLE [dbo].[umbracoPropertyData] DROP CONSTRAINT [IX_umbracoPropertyData_VersionId]
GO

But when running the script - nothing happens and the error still persists.

What is the proper way to drop the constraint?

1

There are 1 best solutions below

0
Julius Goddard On

Step 1: Open Indexes

Step 2: Find the constraint that is causing the problem - in this case IX_umbracoPropertyData_VersionId

Step 3: Delete it.