Entity Dev wants to update smallint fields every time
Posted: Thu 02 Jun 2016 18:16
Using PostgreSQL 9.5 and multiple recent versions of Entity Developer and LinqConnect
My model has an entity with an enumeration field (enumeration defined in the model) and I set this field up to implement in C# as type short (System.Int16). There have been no changes to this entity for a long time but each time I "update database from model" the generated script includes code to ALTER the column type to SMALLINT (notice all upper case) for this entity, even though it already is smallint (notice lower case) in the database. There must be a problem when the db schema is compared to the model to generate the update script.
Added note, after testing I see this same issue where a field is not an enumeration but just a simple short.
My model has an entity with an enumeration field (enumeration defined in the model) and I set this field up to implement in C# as type short (System.Int16). There have been no changes to this entity for a long time but each time I "update database from model" the generated script includes code to ALTER the column type to SMALLINT (notice all upper case) for this entity, even though it already is smallint (notice lower case) in the database. There must be a problem when the db schema is compared to the model to generate the update script.
Added note, after testing I see this same issue where a field is not an enumeration but just a simple short.