title: Entity Framework Migrations: convert decimal? to decimal with default value for nulls
body: <p>I get <code>SqlCeException ... The column cannot contain null values. [ Column name = Subtotal</code>
  when I run the following Entity Framework migration.</p>
  
  <pre><code>public override void Up()
  {
      AlterColumn("BuildingOrders", "Subtotal",
          c =&gt; c.Decimal(nullable: false, precision: 18, scale: 2));
  }
  </code></pre>
  
  <p>Is this the right way to set the default value? It seems too easy :)</p>
  
  <pre><code>public override void Up()
  {
      AlterColumn("BuildingOrders", "Subtotal",
          c =&gt; c.Decimal(nullable: false, precision: 18, scale: 2, defaultValue: 0));
  }
  </code></pre>
  
  <p>I tried this after seeing a <a href="https://stackoverflow.com/questions/8287233/set-a-default-value-in-a-decimal-column">similar</a> question for ruby on rails.</p>