title: Data Migration In MVC3 (Using EF.4.3)
body: <p>I am doing data-migration for my project. But I have one question, for example:
  I have Book table with following fields: </p>
  
  <pre><code>ID  Name   Color
  
  1   Java    red
  
  2   MVC     blue
  
  3   .Net    blue
  </code></pre>
  
  <p>I tried to change the name of field from "Color" to "BookColor" using Code First tech. But after migration the table looked like this: </p>
  
  <pre><code>ID  Name   BookColor
  
  1   Java    null
  
  2   MVC     null
  
  3   .Net    null
  </code></pre>
  
  <p>I lost my field values. How can I make sure that all value are transfered?</p>
  
  <p>I'm using Entity Framework with MVC3</p>
  
  <p><strong>EDIT</strong> This  is  my DBMigration Class:</p>
  
  <pre><code>public partial class AddCreative : DbMigration
  {
  
      public override void Up()
      {
          AddColumn("Authors", "Names", c =&gt; c.String(maxLength: 4000));
          DropColumn("Authors", "Name");
      }
  
  
      public override void Down()
      {
          AddColumn("Authors", "Name", c =&gt; c.String(maxLength: 4000));
          DropColumn("Authors", "Names");
      }
  }
  </code></pre>
  
  <p>I  have changed <code>Name</code> to <code>Names</code>  after changing (I lost my data in name field).</p>