-1

I am trying to update-database by using powershell. but I am getting this error:

"FK_Supplier_UserType_UserTypeId"

which I already deleted the table (UserType)

Anyone can help?

I searched "usertypeId" all database and codes but I can't find it...What is the issue here and what am I supposed to to?

McNets
  • 10,352
  • 3
  • 32
  • 61
A Good Man
  • 31
  • 1
  • 7

1 Answers1

1

Although you have not posted the whole error message it is saying that another table references UserTypeId of UserType table.

Before to drop a table, you must ensure there isn't any reference or dependency to this table.

Have a look at this question: How can I drop a table if there is a foreign key constraint in SQL Server?

McNets
  • 10,352
  • 3
  • 32
  • 61
  • Thanks for comments...I already dropped the table(UserType) at the database level by mistake...that's why I am getting this message..what should I do for this? – A Good Man Feb 25 '18 at 12:20
  • You should drop foreign key constraint. This question shows how to find FK dependencies. https://stackoverflow.com/q/925738/3270427 – McNets Feb 25 '18 at 12:22