title: Rename a foreign key in Entity Framework Core without dropping data
body: <p>I have two model classes:</p>
  
  <pre><code>public class Survey
  {
      public int SurveyId { get; set; }
      public string Name { get; set; }
  }
  
  public class User
  {
      public int UserId { get; set; }
  
      public int SurveyId { get; set; }
      public Survey Survey { get; set; }
  }
  </code></pre>
  
  <p>I want to rename <code>Survey</code> to <code>StudentSurvey</code>, so it will have <code>StudentSurveyId</code>. I update the class name and the properties in the models accordingly and add a migration.</p>
  
  <p>However, I get:</p>
  
  <blockquote>
    <p>The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_User_Surveys_SurveyId". The conflict occurred in database "AppName", table "dbo.Survey", column 'SurveyId'.</p>
  </blockquote>
  
  <p>I think it is trying to drop the data and because it requires data in the column (cannot be null) I'm seeing that error. But I don't want to drop the data. How can I just rename it?</p>