Code first migration from NVARCHAR2 to NCLOB failed
Posted: Fri 25 Sep 2015 18:26
Using EF 6.1.3 and dotConnect for oracle 8.4.359 in a Code first migration, I tried to convert a data field from NVARCHAR2 to NVARCHAR(max) in SQL server and everything worked fine. But the same migration failed with an Oracle database.
Fluent maping was
this.Property(t => t.Element).HasMaxLength(256);
Changed to
this.Property(t => t.Element).IsMaxLength();
PM console commends
- Add-Migration V1
AlterColumn("A.PREFERENCE", "ELEMENT", c => c.String());
Update-Database -targetmigration V1
System.NotSupportedException: ORA-22859: invalid modification of columns. An attempt was made to modify NCLOB column type.
thanks
JL
Fluent maping was
this.Property(t => t.Element).HasMaxLength(256);
Changed to
this.Property(t => t.Element).IsMaxLength();
PM console commends
- Add-Migration V1
AlterColumn("A.PREFERENCE", "ELEMENT", c => c.String());
Update-Database -targetmigration V1
System.NotSupportedException: ORA-22859: invalid modification of columns. An attempt was made to modify NCLOB column type.
thanks
JL