title: EF Foreign Keys migration throws error
body: <p>Ive got 2 tables:</p>
  
  <pre><code>[Table("Ticket_Admins")]
  public class TicketAdmin
  {
      public TicketAdmin()
      {
          Name = new Record();
          Name.IsRevisioned = false;
          Name.IsVisible = true;
          Name.Category = typeof(TicketAdmin).Name;
      }
      [Key]
      public int Id { get; set; }
      public virtual Record Name { get; set; }
      public virtual TicketPost Post { get; set; }
      public virtual UserProfile User { get; set; }
  }
  
  [Table("UserProfile")]
  public class UserProfile
  {
      private string _email;
  
      [Key]
      [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]       
      public int UserId { get; set; }
      public string Email 
      {
          get { return _email; }
          set { _email = value.ToLower(); }
      }
  }
  </code></pre>
  
  <p>And map them in context:</p>
  
  <pre><code>    protected override void OnModelCreating(DbModelBuilder modelBuilder)
      {
          modelBuilder.Entity&lt;TicketAdmin&gt;()
              .HasRequired(x =&gt; x.User)
              .WithRequiredPrincipal();
          base.OnModelCreating(modelBuilder);
      }
  </code></pre>
  
  <p>But on Migration I Am getting error:</p>
  
  <blockquote>
    <p>The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_dbo.UserProfile_dbo.Ticket_Admins_UserId". The conflict occurred in database "aspnet-BoomzHelperPortal-dbv3", table "dbo.Ticket_Admins", column 'Id'.</p>
  </blockquote>
  
  <p>Am I doing something wrong here? What I am exactly trying to do is to Map My <code>TicketAdmin</code> to <code>UserProfile</code> by id (<code>UserProfile.UserId =  TicketAdmin.Id</code>)</p>
  
  <p>Thak you for your time!</p>
  
  <p>UPDATE:
  Ive just tried to create an empty db eith this shema an found out that it makes <code>UserProfile.UserId</code> a foreign key column but what i need is <code>TicketAdmin.Id</code> to become a FK column. (Its like all users have UserProfile, but not everybody has TicketAdmin Settings, And TicketAdmin is a child of UserProfile and has the same ID as the UserProfile ID).</p>