Hi guys,
I have a mySql db build by someone. A table has a colum defined as nullable timestamp.
I map it to my entity as
[Column(TypeName = "timestamp")]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public DateTime? MYCOL{ get; set; }
and Migrations translate this in
AlterColumn("dbo.locusrchkin", "MYCOL", c => c.DateTime(precision: 0, storeType: "timestamp"));
Running Update-Database I receive the error "Invalid default value for 'MYCOL'" because it runs
alter table `MYTABLE` modify `MYCOL` timestamp
How con I map a nullable timestamp in my POCO entity ??? It drive me crazy!
TY.
I have a mySql db build by someone. A table has a colum defined as nullable timestamp.
I map it to my entity as
[Column(TypeName = "timestamp")]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public DateTime? MYCOL{ get; set; }
and Migrations translate this in
AlterColumn("dbo.locusrchkin", "MYCOL", c => c.DateTime(precision: 0, storeType: "timestamp"));
Running Update-Database I receive the error "Invalid default value for 'MYCOL'" because it runs
alter table `MYTABLE` modify `MYCOL` timestamp
How con I map a nullable timestamp in my POCO entity ??? It drive me crazy!
TY.