v8: Add varchar(max) support
See original GitHub issueWe need to be able to support NvarcharMax for SQL server in Umbraco. Currently there isn’t any support for this in the code, only NText which is deprecated.
We need to somehow support NvarcharMax but also keeping in mind that however this works would need to fallback to NText for SqlCe.
The migration syntax would need to support NvarcharMax along with DTO attributes.
Original post:
In v8 there is an ability to create DB tables using a builder interface. As part of this you can do things like define columns and their types. These then get built into a SQL statement to run on the various database types.
There is currently an ability to define columns as strings and provide an int size, such as
Create.Table("myTable").WithColumn("myColumn").AsString(255)
This will then get converted into a SQL statement that creates a column of type nvarchar(255)
.
Ones thing missing though is an ability to create a string column of type nvarchar(max)
as max is clearly not an int value which the .AsString method requires.
We could really do with an additional means of defining a string value with it’s size set to max
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
So keep in mind if you are using nvarchar max - you will need to support ntext as well if you are doing this from a package perspective else it won’t work with sqlce
Fixed in https://github.com/umbraco/Umbraco-CMS/pull/8031