title: Create table and insert data into it during EF code first migration
body: <p>I'm using Entity Framework Code First with Code First migrations.</p>
  
  <p>During a migration, I need to create a new table, and then insert some data into it.</p>
  
  <p>So I create the table with :</p>
  
  <pre><code>CreateTable("MySchema.MyNewTable",
      c =&gt; new
      {
          MYCOLUMNID = c.Int(nullable: false, identity: true),
          MYCOLUMNNAME = c.String(),
       })
     .PrimaryKey(t =&gt; t.MYCOLUMNID);
  </code></pre>
  
  <p>Then I try to insert data with :</p>
  
  <pre><code>using (var context = new MyContext())
  {
      context.MyNewTableDbSet.AddOrUpdate(new[]
      {
      new MyNewTable
      {
         MYCOLUMNNAME = "Test"
      }
      });
      context.SaveChanges();
  }
  </code></pre>
  
  <p>But I get an error :</p>
  
  <blockquote>
    <p>Invalid object name 'mySchema.MyNewTable'.</p>
  </blockquote>
  
  <p>Is it possible to do what I need ? Create a  table and inserto data into it in  the same migration ?</p>
  
  <p>I already have other migrations where I create tables or insert data into a table, but never in the same migration...</p>