mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Simplified syntax for clob fields
--HG-- branch : dev
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Orchard.Core.Common.DataMigrations {
|
||||
//CREATE TABLE Common_BodyRecord (Id INTEGER not null, Text TEXT, Format TEXT, ContentItemRecord_id INTEGER, primary key (Id));
|
||||
SchemaBuilder.CreateTable("BodyRecord", table => table
|
||||
.ContentPartVersionRecord()
|
||||
.Column<string>("Text", column => column.WithLength(10000))
|
||||
.Column<string>("Text", column => column.Unlimited())
|
||||
.Column<string>("Format")
|
||||
);
|
||||
|
||||
|
@@ -20,7 +20,7 @@ namespace Orchard.Comments.DataMigrations {
|
||||
.Column<string>("Email")
|
||||
.Column<string>("Status")
|
||||
.Column<DateTime>("CommentDateUtc")
|
||||
.Column<string>("CommentText", column => column.WithLength(10000))
|
||||
.Column<string>("CommentText", column => column.Unlimited())
|
||||
.Column<int>("CommentedOn")
|
||||
.Column<int>("CommentedOnContainer")
|
||||
);
|
||||
|
@@ -67,7 +67,12 @@ namespace Orchard.DevTools.Services {
|
||||
}
|
||||
|
||||
if ( createColumn.Length.HasValue ) {
|
||||
options.Add(string.Format("WithLength({0})", createColumn.Length ));
|
||||
if ( createColumn.Length == 10000 ) {
|
||||
options.Add("Unlimited()");
|
||||
}
|
||||
else {
|
||||
options.Add(string.Format("WithLength({0})", createColumn.Length));
|
||||
}
|
||||
}
|
||||
|
||||
if ( createColumn.Precision > 0 ) {
|
||||
|
Reference in New Issue
Block a user