Skip to main content
Solved

An explicit DROP INDEX is not allowed on index


I created a unique index and I deployed my project. When I try to delete this index I am getting

“An explicit DROP INDEX is not allowed on index ‘ sales_person.unique_sales_person’ . It is being used for FOREING KEY constraint enforcement.”

error message.

I tried to clean install but it didn’t work. It is in software factory version 2022.1

How can I solve this?

 

Best answer by Mark Jongeling

Freddy wrote:

To fix this problem, first drop al Foreign Keys and Constraints on any of the columns used in the Index. Then drop the INDEX and afterwards you can recreate the FK and constraints. I've had a similar issue. 

We found the issue. The table had both a Primary key and an Unique index for the same column. We'll add a validation in the next version (2022.2) to ensure developers get notified of this problem.

View original
This topic has been closed for comments

Mark Jongeling
Administrator
Forum|alt.badge.img+23

Hi Mehmet,

Could you create a ticket for this in TCP? We'll need a backup of your database including this Indexes script so we can figure out what is causing this error to occur.

Thanks!


Freddy
Forum|alt.badge.img+16
  • Thinkwise Local Partner Brasil
  • March 18, 2022

To fix this problem, first drop al Foreign Keys and Constraints on any of the columns used in the Index. Then drop the INDEX and afterwards you can recreate the FK and constraints. I've had a similar issue. 


Mark Jongeling
Administrator
Forum|alt.badge.img+23
Freddy wrote:

To fix this problem, first drop al Foreign Keys and Constraints on any of the columns used in the Index. Then drop the INDEX and afterwards you can recreate the FK and constraints. I've had a similar issue. 

We found the issue. The table had both a Primary key and an Unique index for the same column. We'll add a validation in the next version (2022.2) to ensure developers get notified of this problem.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings