title: Entity framework migration - add new column with a value for existing entries
body: <p>I have an application with Entity Framework Code First.</p>
  
  <p>In a table, I have to add a column. So I added it in the model and created a Migration.</p>
  
  <p>But during the migration, I would like to update the existing entries and add a value for this new column. This value has to be taken from the database (a constant field in my "Configuration" table).</p>
  
  <p>But the default value should only be applied for existing entries, not for the next.</p>
  
  <p>How can I do it from my Migration class ?</p>
  
  <p>My current migration class :</p>
  
  <pre><code>public override void Up()
  {
      var theDefaultValue = MyConstants.MyConstantParameterFromDatabase;
      AddColumn("MySchema.MyTable", "MyNewColumn", c =&gt; c.Decimal(nullable: false, precision: 18, scale: 2));
  }
  </code></pre>
  
  <p>Edit : still looking for a solution to update all existing entries (with 0 value) but only after this migration...</p>