Hello,
when using code first migrations,
public class Model
{
public int Id { get; set; }
public string Serial { get; set; }
}
creates a coresponding table with the 'Serial' field as a NCLOB oracle type.
but when adding length restraints to the model like this
public class Model
{
public int Id { get; set; }
[StringLength(50)]
public string Serial { get; set; }
}
and adding a new migration, the type must be converted to a nvarchar type, and Update-Database command fails with
ORA-22859: invalid modification of columns
is there a workaround for this or is manual editing the only option?
Thank you
ORA-22859: invalid modification of columns
Re: ORA-22859: invalid modification of columns
Please refer to http://blog.devart.com/entity-framework ... ionSupport: the AlterColumn operation cannot be executed for a LOB column (CLOB/NCLOB/BLOB) in Oracle.
As a workaround, please use DropColumn / AddColumn instead of AlterColumn in this particular case.
As a workaround, please use DropColumn / AddColumn instead of AlterColumn in this particular case.