Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8083607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:31:36+00:00 2026-06-05T17:31:36+00:00

Im using EF 4.3 with explicit migrations. When defining a new migration and calling

  • 0

Im using EF 4.3 with explicit migrations. When defining a new migration and calling Update-Database on my local dev db everything is working fine and only the not applied migrations are applied to the db.

But when i try to migrate another db (that is in the same state as my dev db before migrating) with

Update-Database -ConnectionStringName=MyProdConnectionStringName

it seems that the db state and the existing __MigrationHistory table is ignored and the ef applies all migrations to my prod db which of cause fails because there are already some tables there.

Maybe its relevant to know, that i use a custom schema for my tables with [Table("TabName", Schema = "stepid")]. The __MigrationHistory table has the default schema of the database (dbo on my dev machine and projects on my prod environment).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:31:37+00:00Added an answer on June 5, 2026 at 5:31 pm

    Ok, it seems that the __MigrationHistory table has to be in the schema dbo. EF migrations will use the default schema of the database when creating it (in my case its called “projects”) and afterwards when calling Update-Database it won’t query that table but assumes that there was never any migration applied to the db.

    When i manually change the schema to dbo it works like it should.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are using Entity Framework 4.3.1's migrate.exe tool to run database migrations from our
I am aware that a CALayer's shadowPath is only animatable using explicit animations, however
I am trying to change the property type in interface implementation class using explicit
My case it is Ninject 2. // normal explicit dispose using (var dc =
I keep getting ActivityNotFoundException: Unable to find explicit activity class ... when using Eclipse's
using (var file_stream = File.Create(users.xml)) { var serializer = new XmlSerializer(typeof(PasswordManager)); serializer.Serialize(file_stream, this); file_stream.Close();
I just started using explicit resource files. I performed these steps: In the root
I'm having trouble getting my dll to work when using explicit linking. Using implicit
I am going one activity to another using an explicit Intent and I declare
I want to have such kind of work flow using explicit lock/condition variables (It's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.