Simplified syntax for clob fields

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2010-07-16 13:51:07 -07:00
parent bd50d68644
commit 1bc19bdff0
7 changed files with 25 additions and 4 deletions

View File

@@ -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")
);

View File

@@ -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")
);

View File

@@ -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 ) {