Skip to content

Commit

Permalink
Set UserValue column to nvarchar(max) (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickdemooij9 committed Apr 27, 2023
1 parent 71820bb commit f4d17e4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ public MetaFieldsMigrationPlan()

protected override void DefinePlan()
{
To<MetaFieldsInitialMigration>("state-1");
To<MetaFieldsInitialMigration>("state-1")
.To<MetaFieldsValueTextMigration>("state-2");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Umbraco.Cms.Infrastructure.Migrations;

namespace SeoToolkit.Umbraco.MetaFields.Core.Migrations
{
public class MetaFieldsValueTextMigration : MigrationBase
{
public MetaFieldsValueTextMigration(IMigrationContext context) : base(context)
{
}

protected override void Migrate()
{
Database.Execute($"ALTER TABLE SeoToolkitMetaFieldsValue ALTER COLUMN UserValue nvarchar(max);");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class MetaFieldsValueEntity
public string Culture { get; set; } = "";

[Column("UserValue")]
[SpecialDbType(SpecialDbTypes.NVARCHARMAX)]
public string UserValue { get; set; }
}
}

0 comments on commit f4d17e4

Please sign in to comment.