Skip to content

Commit 1e0ae4f

Browse files
authored
Merge pull request #402 from Kentico/fix/legacy-media-file
Enlarge Legacy file description field to nvarchar max
2 parents d81cd56 + bfb4617 commit 1e0ae4f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
namespace Migration.Tool.Source;
22
public static class FieldConstants
33
{
4-
public const int MaxColumnSize = 1000;
4+
/// <summary>
5+
/// Value for <see cref="Kentico.Xperience.UMT.Model.FormField.ColumnSize"/> equivalent to NVARCHAR(MAX) in database.
6+
/// Works only if <see cref="Kentico.Xperience.UMT.Model.FormField.ColumnType"/> is "longtext"
7+
/// </summary>
8+
public const int LongTextMaxColumnSize = 0;
59
}

KVA/Migration.Tool.Source/Services/AssetFacade.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,11 @@ private void AssertSuccess(IImportResult importResult, IUmtModel model)
339339
internal static readonly FormField LegacyMediaFileDescriptionField = new()
340340
{
341341
Column = "LegacyMediaFileDescription",
342-
ColumnType = "text",
342+
ColumnType = "longtext",
343343
AllowEmpty = true,
344344
Visible = true,
345345
Enabled = true,
346-
ColumnSize = FieldConstants.MaxColumnSize,
346+
ColumnSize = FieldConstants.LongTextMaxColumnSize,
347347
Guid = new Guid("98F43915-B540-478D-80A4-E294E631C431"),
348348
Properties = new FormFieldProperties { FieldCaption = "Description", },
349349
Settings = new FormFieldSettings { ControlName = "Kentico.Administration.TextArea" }

0 commit comments

Comments
 (0)