The column data type defined by default in the database can`t be changed and even if you do it will always revert back to the original data type. We only support one way synchronization with the database schema, custom changes of fields directly into the database are not preserved and Sitefintiy always tries to migrate the db schema to be up to date with the mappings defined in our code. When you rebuild your project - sitefinity performs an upgrade - because your new build number differs from the last schema version records kept in the databse.
During the upgrade we make sure the db schema (including column sizes) is up to date with the coded mappings of each persistent class.
What you need to do is use the MetadataMapping attribute if you want to specify whether type of given db column is VARCHAR or NVARCHAR. In your case you will need to pass two parameters to the MetadataMapping constructor -> bool isUnicode(e.g. whether is NVARCHAR) and bool isLong(e.g. whether is MAX).
public virtual Lstring WhatIsInTheBox
if (this.whatIsInTheBox == null)
this.whatIsInTheBox = this.GetString("WhatIsInTheBox");
this.whatIsInTheBox = value;
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal
and vote to affect the priority of the items