0

Migration data first time success. But when I update entity and migration again, it fails:

Unable to generate an explicit migration because the following explicit migrations are pending: [201712281248174_ttt]. Apply the pending explicit migrations before attempting to generate a new explicit migration.

Help! Thank you!

1
  • Try these suggestions first and report back if your scenario is different along with relevant code and things you have tried. Commented Dec 28, 2017 at 14:27

1 Answer 1

0

You have to enable automatic migrations in your migration configuration file.

public Configuration()
{
    AutomaticMigrationsEnabled = true;
}

or explicitly run command Update-Database in Package Manager Console.

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

1 Comment

Thank you! I find the problem is the HasDefaultSchema parameter difference with the User Id in connectionStrings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.