数据库迁移在 sql server 2012 中不起作用

Database Migration doesn't work in sqlserver 2012

数据库创建和迁移在 sql 2008 年有效,但在 sql2012 年无效。

错误:“table 'ePoll.Answer' 中的列 'IpAddress' 的类型无效 用作索引中的键列。"

属性 在模型中:

 [MaxLength(39)]
 [Index(IsClustered = false)]
 public string IpAddress { get; set; }

当我使用 [Required] 属性时数据库迁移有效。

 [Required]
 [MaxLength(39)]
 [Index(IsClustered = false)]
 public string IpAddress { get; set; }