title: Does EF Migrations Support Adding Not Null Foreign Keys
body: <p>What I'd like is to go from:</p>
  
  <pre><code>public class SomeEntity
  {
      public int Id {get; set;}
  
      //...
  }
  </code></pre>
  
  <p>To:</p>
  
  <pre><code>public class SomeEntity
  {
      public int Id {get; set;}
  
      public int OtherEntityId {get; set;}
  
      [ForeignKey("OtherEntityId")]
      public OtherEntity Other {get; set;}
  
      //...
  }
  </code></pre>
  
  <p>At the database level, I'm assuming the only way to do this is:</p>
  
  <ol>
  <li>Add a nullable foreign key</li>
  <li>Set valid values on the foreign key</li>
  <li>Add a not-null constraint</li>
  </ol>
  
  <p>Is there some way to make this happen with EntityFramework migrations? What I'm looking for is code that could be put into the Seed method, or elsewhere, that would update the database automatically. I understand that I can add a nullable foreign key, but what I want is to add a non-nullable foreign key in one step.</p>