title: EF6 MVC5 Code First Migrations not working for 1 Table/Class
body: <p>I'm building an MVC5 project using Code First migrations with EF6 in Visual Studio 2013.  Everything has been working as expected up to now: multiple migrations adding multiple tables to my db.  After add a new class that should map to a new database table, add-migration won't pick up the new class and the new migration file is generated with no code in the Up() and Down() methods.  The class in question is as simple as it can be: </p>
  
  <pre><code>[Table("SurveyItemOption")]
  public class SurveyItemOption
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
      public string Option { get; set; }
      public virtual SurveyItem SurveyItem { get; set; }
  }
  </code></pre>
  
  <p>As you can see, I've added the DatabaseGenerated attribute myself to see if that makes any difference, but it still doesn't pick up the new class and create the new table.  SurveyITem is the parent class and its db table is generated with Code First, as is the Survey class which is the parent of SurveyItem.  Below is the other code that is successfully generated.</p>
  
  <pre><code>public enum ListType
  {
      None = 0,
      Circle = 1,
      Square = 2,
      LowerAlpha = 3,
      LowerLatin = 4,
      LowerRoman = 5,
      UpperAlpha = 6,
      UpperLatin = 7,
      UpperRoman = 8
  }
  
  [Table("Survey")]
  public class Survey
  {
      [Key]
      [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
      public string Title { get; set; }
      public bool IsActive { get; set; }
      public string Owner_UserId { get; set; }
      public int Module_Id { get; set; }
      public virtual IEnumerable&lt;SurveyItem&gt; Items { get; set; }
  }
  
  [Table("SurveyItem")]
  public class SurveyItem
  {
      public SurveyItem() {
          this.OptionListType = ListType.None;
      }
      [Key]
      [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
      public string Item { get; set; }
      public int Survey_Id { get; set; }
  
      [EnumDataType(typeof(ListType))]
      public ListType OptionListType { get; set; }
  
      public virtual int OptionListTypeId
      {
          get
          {
              return (int)this.OptionListType;
          }
          set
          {
              this.OptionListType = (ListType)value;
          }
      }
  
  }
  
  [Table("SurveyAnswer")]
  public class SurveyAnswer
  {
      [Key]
      [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
      public string UserId { get; set; }
      public string Answer { get; set; }
      [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Computed)]
      public DateTime Created { get; set; }
  
      public virtual SurveyItem SurveyItem { get; set; }
  }
  </code></pre>
  
  <p>I've gone as far as creating a new project and imported all my Models, Views and Controllers (along with various Content files) from this project, built the project, and enabled migrations.  The SurveyItemOption class is still ignored in the initial migration code.  </p>
  
  <p>Please help!  Any ideas on how to fix this would be much appreciated!</p>