title: EntityFramework EF won't let me re-scaffold
body: <p>I've done this kind of procedure multiple times successfully, but for the first time, it seems to not work. I want to merge two branches of my application, they have different Code First Migration states. I'm aware of the fact that during development of two versions, the schema changed in both, resulting in a different snapshots, so I need to re-scaffold my merged Migrations to match the database snapshots, basically <a href="https://msdn.microsoft.com/en-us/data/dn481501.aspx" rel="nofollow noreferrer">following this guide, Option 2</a>. In the given Project I have dozens of Migrations and multiple of them were merged and re-scaffolded successfully as described.</p>
  
  <p>So what I'm doing is bringing the database state to the database version before Migration (e.g. <code>Update-Database -targetMigration 201511261243087_BeforeMigration</code>, Step 4 of the Guide) and re-scaffold the merged Migrations in the correct order, so they can re-scaffold the metadata.</p>
  
  <p>When I use the Command <code>Add-Migration 201512170931290_FirstMergedMigration</code>, I get the following error message:</p>
  
  <blockquote>
    <p>Unable to generate an explicit migration because the following
    explicit migrations are pending:
    [201512170931290_FirstMergedMigration,
    201512140935307_SecondMergedMigration]. Apply the pending explicit
    migrations before attempting to generate a new explicit migration.</p>
  </blockquote>
  
  <p>What? I wasn't expecting this. I'm expecting the command to re-scaffold the existing migration's metadata and update the Schema snapshot. But it's assuming that I want to add a new Migration. The <code>-force</code> flag doesn't help either.</p>
  
  <p>When I follow the recommended step and <code>Update-Database</code>, EF will create a new Migration, called: <code>201512210931290_201512170931290_FirstMergedMigration</code>. Now THATs really crazy.</p>
  
  <p>I wish there was a separate command to Re-Scaffold Metadata so it would maybe show a clearer error message.</p>
  
  <p>Anybody seen this before?</p>
  
  <h3>UPDATE:</h3>
  
  <p>See my <a href="https://stackoverflow.com/a/34396646/265165">own answer</a>.</p>