title: EF One to Zero or One relationship on existing tables leads to error on database updating
body: <p>Entity Framework 6 - Code First.
  We have existing classes with their tables on our database for a while. These tables already contains data we can not delete.</p>
  
  <p>We try to add "one to zero-or-one" relationship between them as follows:</p>
  
  <pre><code>public class Session
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      [ForeignKey("User")]
      public long Id { get; set; }
      ...
      public virtual User User { get; set;}
  }
  
  public class User
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      [ForeignKey("Session")]
      public long Id { get; set; }
      ...
      public virtual Session Session { get; set;}
  }
  </code></pre>
  
  <p>This is the migration it created according to the above changes:</p>
  
  <pre><code>public partial class AddingSessionAndDialogOneToOneRelation : DbMigration
  {
      public override void Up()
      {
          CreateIndex("dbo.Users", "Id");
          AddForeignKey("dbo.Users", "Id", "dbo.Sessions", "Id");
      }
  
      public override void Down()
      {
          DropForeignKey("dbo.Users", "Id", "dbo.Sessions");
          DropIndex("dbo.Users", new[] { "Id" });
      }
  }
  </code></pre>
  
  <p>But when we run Update-Database command, we get this error:</p>
  
  <blockquote>
    <p>The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_dbo.Users_dbo.Sessions_Id". The conflict occurred in database "SVC_AAA", table "dbo.Sessions", column 'Id'.</p>
  </blockquote>