title: Entity Framework doesn't add new table to database
body: <p>Usually I make projects with database first, now I tried (due to the ASP.NET login framework) the code first approach. So far so good, all works. Now I needed to add a new model to the project, did this and added the model in the <code>DbContext</code>:</p>
  
  <pre><code>public class ApplicationDbContext : IdentityDbContext&lt;ApplicationUser&gt;
  {
      public ApplicationDbContext()
          : base("DefaultConnection", throwIfV1Schema: false)
      {
      }
  
      public static ApplicationDbContext Create()
      {
          return new ApplicationDbContext();
      }
  
      public System.Data.Entity.DbSet&lt;Order&gt; Orders { get; set; } // existing one
      public System.Data.Entity.DbSet&lt;Document&gt; Documents { get; set; } // new one
  }
  </code></pre>
  
  <p>So I already have data in the orders table in my database and users in the asp.net user tables, I can't allow to drop the db, so I thought, automatic migration:</p>
  
  <pre><code>Package Manager &gt; Enable-Migrations -EnableAutomaticMigrations
  </code></pre>
  
  <p>And then </p>
  
  <pre><code>PM &gt; update-database (-f)
  </code></pre>
  
  <p>however, this returns: </p>
  
  <pre><code>No pending explicit migrations.
  </code></pre>
  
  <p>The table just won't be created. However, a new folder called <em>Migrations</em> was created with 2 files: <code>###########_dbname.cs</code> and <code>Configurations.cs</code></p>
  
  <p>Any hints why my table won't be created? I even tried this in the migration file</p>
  
  <pre><code>public partial class project: DbMigration
  {
      public override void Up()
      {
          CreateTable("dbo.Documents", c =&gt; new
          {
              DocumentId = c.Int(nullable: false, identity: true),
              Label = c.Int(nullable: false),
              Data = c.Binary(),
              OrderId = c.Int(nullable: false)
          }).PrimaryKey(t =&gt; t.DocumentId)
          .ForeignKey("dbo.Orders", t =&gt; t.OrderId, cascadeDelete: true);
  </code></pre>
  
  <p>in vain</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>If I perform <code>add-migration</code>, the following file is being created, how do I modify it?</p>
  
  <pre><code>using System;
  using System.Data.Entity.Migrations;
  
  public partial class documents : DbMigration
  {
      public override void Up()
      {
      }
  
      public override void Down()
      {
      }
  }
  </code></pre>
  
  <p>simply performing <code>update-database</code> doesn't change anything</p>