3

When I tried to use update-database -verbose -force, I get an error:

ALTER TABLE DROP COLUMN failed because column 'countReferralsRegistrations' does not exist in table 'UserProfile'.

The problem is - I don't have (and I don't want to have) this column in model and also in table UserProfile.

How can I resolve it?

2 Answers 2

3

SOLUTION

use first: Add-Migration InitialMigrations -IgnoreChanges and then update-database verbose. This will work

Sign up to request clarification or add additional context in comments.

Comments

0

This will happen, because you may delete your Table column's manually and will update the database,

This is the solution for this. - Open the migration file which you created at last. - comment below lines and update-database again - DropForeignKey, DropIndex, DropColumn

Thank You..

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.