diff --git a/src/Umbraco.Core/Configuration/Models/NuCacheSerializerType.cs b/src/Umbraco.Core/Configuration/Models/NuCacheSerializerType.cs
index ed5e6a5d26..8f889b10c3 100644
--- a/src/Umbraco.Core/Configuration/Models/NuCacheSerializerType.cs
+++ b/src/Umbraco.Core/Configuration/Models/NuCacheSerializerType.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Umbraco.
+// Copyright (c) Umbraco.
// See LICENSE for more details.
namespace Umbraco.Cms.Core.Configuration.Models
@@ -8,8 +8,7 @@ namespace Umbraco.Cms.Core.Configuration.Models
///
public enum NuCacheSerializerType
{
- JSON,
-
- MessagePack
+ MessagePack = 1, // Default
+ JSON = 2
}
}
diff --git a/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs b/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs
index 024e533fb3..28f8cd8229 100644
--- a/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs
+++ b/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs
@@ -13,12 +13,10 @@ namespace Umbraco.Cms.Core.Configuration.Models
///
public int? BTreeBlockSize { get; set; }
- // TODO: Set default to MessagePack
-
///
/// The serializer type that nucache uses to persist documents in the database.
///
- public NuCacheSerializerType NuCacheSerializerType { get; set; }
+ public NuCacheSerializerType NuCacheSerializerType { get; set; } = NuCacheSerializerType.MessagePack;
///
/// The paging size to use for nucache SQL queries.
diff --git a/src/Umbraco.Core/Migrations/IMigration.cs b/src/Umbraco.Core/Migrations/IMigration.cs
deleted file mode 100644
index 059ab4f2f5..0000000000
--- a/src/Umbraco.Core/Migrations/IMigration.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using Umbraco.Cms.Core.Composing;
-
-namespace Umbraco.Cms.Core.Migrations
-{
- ///
- /// Represents a migration.
- ///
- public interface IMigration : IDiscoverable
- {
- ///
- /// Executes the migration.
- ///
- void Migrate();
- }
-}
diff --git a/src/Umbraco.Core/Migrations/NoopMigration.cs b/src/Umbraco.Core/Migrations/NoopMigration.cs
deleted file mode 100644
index 9156c8cd09..0000000000
--- a/src/Umbraco.Core/Migrations/NoopMigration.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace Umbraco.Cms.Core.Migrations
-{
- public class NoopMigration : IMigration
- {
- public void Migrate()
- {
- // nop
- }
- }
-}
diff --git a/src/Umbraco.Infrastructure/Migrations/IMigrationBuilder.cs b/src/Umbraco.Infrastructure/Migrations/IMigrationBuilder.cs
index 325c8dd752..087e04d41a 100644
--- a/src/Umbraco.Infrastructure/Migrations/IMigrationBuilder.cs
+++ b/src/Umbraco.Infrastructure/Migrations/IMigrationBuilder.cs
@@ -1,10 +1,9 @@
-using System;
-using Umbraco.Cms.Core.Migrations;
+using System;
namespace Umbraco.Cms.Infrastructure.Migrations
{
public interface IMigrationBuilder
{
- IMigration Build(Type migrationType, IMigrationContext context);
+ MigrationBase Build(Type migrationType, IMigrationContext context);
}
}
diff --git a/src/Umbraco.Infrastructure/Migrations/IMigrationContext.cs b/src/Umbraco.Infrastructure/Migrations/IMigrationContext.cs
index 016184d4cf..566b31dc13 100644
--- a/src/Umbraco.Infrastructure/Migrations/IMigrationContext.cs
+++ b/src/Umbraco.Infrastructure/Migrations/IMigrationContext.cs
@@ -1,5 +1,4 @@
-using Microsoft.Extensions.Logging;
-using Umbraco.Cms.Core.Migrations;
+using Microsoft.Extensions.Logging;
using Umbraco.Cms.Infrastructure.Persistence;
namespace Umbraco.Cms.Infrastructure.Migrations
@@ -38,6 +37,6 @@ namespace Umbraco.Cms.Infrastructure.Migrations
/// Adds a post-migration.
///
void AddPostMigration()
- where TMigration : IMigration;
+ where TMigration : MigrationBase;
}
}
diff --git a/src/Umbraco.Core/Migrations/IncompleteMigrationExpressionException.cs b/src/Umbraco.Infrastructure/Migrations/IncompleteMigrationExpressionException.cs
similarity index 95%
rename from src/Umbraco.Core/Migrations/IncompleteMigrationExpressionException.cs
rename to src/Umbraco.Infrastructure/Migrations/IncompleteMigrationExpressionException.cs
index bebed7ab50..67d559c66d 100644
--- a/src/Umbraco.Core/Migrations/IncompleteMigrationExpressionException.cs
+++ b/src/Umbraco.Infrastructure/Migrations/IncompleteMigrationExpressionException.cs
@@ -1,7 +1,7 @@
-using System;
+using System;
using System.Runtime.Serialization;
-namespace Umbraco.Cms.Core.Migrations
+namespace Umbraco.Cms.Infrastructure.Migrations
{
///
/// The exception that is thrown when a migration expression is not executed.
@@ -10,7 +10,7 @@ namespace Umbraco.Cms.Core.Migrations
/// Migration expressions such as Alter.Table(...).Do() must end with Do(), else they are not executed.
/// When a non-executed expression is detected, an IncompleteMigrationExpressionException is thrown.
///
- ///
+ ///
[Serializable]
public class IncompleteMigrationExpressionException : Exception
{
diff --git a/src/Umbraco.Infrastructure/Migrations/MergeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/MergeBuilder.cs
index 4385fd54b8..917560de28 100644
--- a/src/Umbraco.Infrastructure/Migrations/MergeBuilder.cs
+++ b/src/Umbraco.Infrastructure/Migrations/MergeBuilder.cs
@@ -1,6 +1,5 @@
-using System;
+using System;
using System.Collections.Generic;
-using Umbraco.Cms.Core.Migrations;
namespace Umbraco.Cms.Infrastructure.Migrations
{
@@ -32,7 +31,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations
/// Adds a transition to a target state through a migration.
///
public MergeBuilder To(string targetState)
- where TMigration : IMigration
+ where TMigration : MigrationBase
=> To(targetState, typeof(TMigration));
///
@@ -71,16 +70,21 @@ namespace Umbraco.Cms.Infrastructure.Migrations
public MigrationPlan As(string targetState)
{
if (!_with)
+ {
throw new InvalidOperationException("Cannot invoke As() without invoking With() first.");
+ }
// reach final state
_plan.To(targetState);
// restart at former end of branch2
_plan.From(_withLast);
+
// and replay all branch1 migrations
foreach (var migration in _migrations)
+ {
_plan.To(_plan.CreateRandomState(), migration);
+ }
// reaching final state
_plan.To(targetState);
diff --git a/src/Umbraco.Infrastructure/Migrations/MigrationBase.cs b/src/Umbraco.Infrastructure/Migrations/MigrationBase.cs
index 56f195cd9f..a447d9e465 100644
--- a/src/Umbraco.Infrastructure/Migrations/MigrationBase.cs
+++ b/src/Umbraco.Infrastructure/Migrations/MigrationBase.cs
@@ -1,6 +1,6 @@
-using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Logging;
using NPoco;
-using Umbraco.Cms.Core.Migrations;
+using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter;
using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create;
using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete;
@@ -16,16 +16,14 @@ namespace Umbraco.Cms.Infrastructure.Migrations
///
/// Provides a base class to all migrations.
///
- public abstract partial class MigrationBase : IMigration
+ public abstract partial class MigrationBase : IDiscoverable
{
///
/// Initializes a new instance of the class.
///
/// A migration context.
protected MigrationBase(IMigrationContext context)
- {
- Context = context;
- }
+ => Context = context;
///
/// Gets the migration context.
@@ -65,17 +63,21 @@ namespace Umbraco.Cms.Infrastructure.Migrations
///
/// Executes the migration.
///
- public abstract void Migrate();
+ protected abstract void Migrate();
- ///
- void IMigration.Migrate()
+ ///
+ /// Runs the migration.
+ ///
+ public void Run()
{
Migrate();
// ensure there is no building expression
// ie we did not forget to .Do() an expression
if (Context.BuildingExpression)
+ {
throw new IncompleteMigrationExpressionException("The migration has run, but leaves an expression that has not run.");
+ }
}
// ensures we are not already building,
diff --git a/src/Umbraco.Infrastructure/Migrations/MigrationBuilder.cs b/src/Umbraco.Infrastructure/Migrations/MigrationBuilder.cs
index e0006134d7..e68dc7a700 100644
--- a/src/Umbraco.Infrastructure/Migrations/MigrationBuilder.cs
+++ b/src/Umbraco.Infrastructure/Migrations/MigrationBuilder.cs
@@ -1,5 +1,4 @@
-using System;
-using Umbraco.Cms.Core.Migrations;
+using System;
using Umbraco.Extensions;
namespace Umbraco.Cms.Infrastructure.Migrations
@@ -13,9 +12,9 @@ namespace Umbraco.Cms.Infrastructure.Migrations
_container = container;
}
- public IMigration Build(Type migrationType, IMigrationContext context)
+ public MigrationBase Build(Type migrationType, IMigrationContext context)
{
- return (IMigration) _container.CreateInstance(migrationType, context);
+ return (MigrationBase) _container.CreateInstance(migrationType, context);
}
}
}
diff --git a/src/Umbraco.Infrastructure/Migrations/MigrationContext.cs b/src/Umbraco.Infrastructure/Migrations/MigrationContext.cs
index 01e270dc79..9b01cd8acd 100644
--- a/src/Umbraco.Infrastructure/Migrations/MigrationContext.cs
+++ b/src/Umbraco.Infrastructure/Migrations/MigrationContext.cs
@@ -1,7 +1,6 @@
-using System;
+using System;
using System.Collections.Generic;
using Microsoft.Extensions.Logging;
-using Umbraco.Cms.Core.Migrations;
using Umbraco.Cms.Infrastructure.Persistence;
namespace Umbraco.Cms.Infrastructure.Migrations
@@ -40,7 +39,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations
///
public void AddPostMigration()
- where TMigration : IMigration
+ where TMigration : MigrationBase
{
// just adding - will be de-duplicated when executing
PostMigrations.Add(typeof(TMigration));
diff --git a/src/Umbraco.Infrastructure/Migrations/MigrationPlan.cs b/src/Umbraco.Infrastructure/Migrations/MigrationPlan.cs
index 3bde224640..287f9d3bf4 100644
--- a/src/Umbraco.Infrastructure/Migrations/MigrationPlan.cs
+++ b/src/Umbraco.Infrastructure/Migrations/MigrationPlan.cs
@@ -1,8 +1,7 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Extensions.Logging;
-using Umbraco.Cms.Core.Migrations;
using Umbraco.Cms.Core.Scoping;
using Umbraco.Extensions;
using Type = System.Type;
@@ -50,7 +49,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations
if (string.IsNullOrWhiteSpace(targetState)) throw new ArgumentException("Value can't be empty or consist only of white-space characters.", nameof(targetState));
if (sourceState == targetState) throw new ArgumentException("Source and target state cannot be identical.");
if (migration == null) throw new ArgumentNullException(nameof(migration));
- if (!migration.Implements()) throw new ArgumentException($"Type {migration.Name} does not implement IMigration.", nameof(migration));
+ if (!migration.Implements()) throw new ArgumentException($"Type {migration.Name} does not implement IMigration.", nameof(migration));
sourceState = sourceState.Trim();
targetState = targetState.Trim();
@@ -86,7 +85,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations
/// Adds a transition to a target state through a migration.
///
public MigrationPlan To(string targetState)
- where TMigration : IMigration
+ where TMigration : MigrationBase
=> To(targetState, typeof(TMigration));
///
@@ -112,8 +111,8 @@ namespace Umbraco.Cms.Infrastructure.Migrations
/// The previous target state, which we need to recover from through .
/// The new target state.
public MigrationPlan ToWithReplace(string recoverState, string targetState)
- where TMigrationNew: IMigration
- where TMigrationRecover : IMigration
+ where TMigrationNew: MigrationBase
+ where TMigrationRecover : MigrationBase
{
To(targetState);
From(recoverState).To(targetState);
@@ -127,7 +126,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations
/// The previous target state, which we can recover from directly.
/// The new target state.
public MigrationPlan ToWithReplace(string recoverState, string targetState)
- where TMigrationNew : IMigration
+ where TMigrationNew : MigrationBase
{
To(targetState);
From(recoverState).To(targetState);
@@ -186,7 +185,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations
/// Adds a post-migration to the plan.
///
public virtual MigrationPlan AddPostMigration()
- where TMigration : IMigration
+ where TMigration : MigrationBase
{
_postMigrationTypes.Add(typeof(TMigration));
return this;
@@ -314,7 +313,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations
logger.LogInformation("Execute {MigrationType}", transition.MigrationType.Name);
var migration = migrationBuilder.Build(transition.MigrationType, context);
- migration.Migrate();
+ migration.Run();
var nextState = transition.TargetState;
origState = nextState;
@@ -338,7 +337,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations
{
logger.LogInformation($"PostMigration: {postMigrationType.FullName}.");
var postMigration = migrationBuilder.Build(postMigrationType, context);
- postMigration.Migrate();
+ postMigration.Run();
}
logger.LogInformation("Done (pending scope completion).");
diff --git a/src/Umbraco.Infrastructure/Migrations/NoopMigration.cs b/src/Umbraco.Infrastructure/Migrations/NoopMigration.cs
new file mode 100644
index 0000000000..0cc2fbad25
--- /dev/null
+++ b/src/Umbraco.Infrastructure/Migrations/NoopMigration.cs
@@ -0,0 +1,14 @@
+namespace Umbraco.Cms.Infrastructure.Migrations
+{
+ public class NoopMigration : MigrationBase
+ {
+ public NoopMigration(IMigrationContext context) : base(context)
+ {
+ }
+
+ protected override void Migrate()
+ {
+ // nop
+ }
+ }
+}
diff --git a/src/Umbraco.Infrastructure/Migrations/PostMigrations/ClearCsrfCookies.cs b/src/Umbraco.Infrastructure/Migrations/PostMigrations/ClearCsrfCookies.cs
index 90fb247f22..2a61351d1f 100644
--- a/src/Umbraco.Infrastructure/Migrations/PostMigrations/ClearCsrfCookies.cs
+++ b/src/Umbraco.Infrastructure/Migrations/PostMigrations/ClearCsrfCookies.cs
@@ -1,4 +1,3 @@
-using Umbraco.Cms.Core.Migrations;
using Umbraco.Cms.Core.Web;
using Constants = Umbraco.Cms.Core.Constants;
@@ -7,16 +6,14 @@ namespace Umbraco.Cms.Infrastructure.Migrations.PostMigrations
///
/// Clears Csrf tokens.
///
- public class ClearCsrfCookies : IMigration
+ public class ClearCsrfCookies : MigrationBase
{
private readonly ICookieManager _cookieManager;
public ClearCsrfCookies(IMigrationContext context, ICookieManager cookieManager)
- {
- _cookieManager = cookieManager;
- }
+ : base(context) => _cookieManager = cookieManager;
- public void Migrate()
+ protected override void Migrate()
{
_cookieManager.ExpireCookie(Constants.Web.AngularCookieName);
_cookieManager.ExpireCookie(Constants.Web.CsrfValidationCookieName);
diff --git a/src/Umbraco.Infrastructure/Migrations/PostMigrations/DeleteLogViewerQueryFile.cs b/src/Umbraco.Infrastructure/Migrations/PostMigrations/DeleteLogViewerQueryFile.cs
index cc1828dc2e..32d150fcca 100644
--- a/src/Umbraco.Infrastructure/Migrations/PostMigrations/DeleteLogViewerQueryFile.cs
+++ b/src/Umbraco.Infrastructure/Migrations/PostMigrations/DeleteLogViewerQueryFile.cs
@@ -1,6 +1,5 @@
-using System.IO;
+using System.IO;
using Umbraco.Cms.Core.Hosting;
-using Umbraco.Cms.Core.Migrations;
using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_9_0_0;
namespace Umbraco.Cms.Infrastructure.Migrations.PostMigrations
@@ -8,7 +7,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.PostMigrations
///
/// Deletes the old file that saved log queries
///
- public class DeleteLogViewerQueryFile : IMigration
+ public class DeleteLogViewerQueryFile : MigrationBase
{
private readonly IHostingEnvironment _hostingEnvironment;
@@ -16,12 +15,13 @@ namespace Umbraco.Cms.Infrastructure.Migrations.PostMigrations
/// Initializes a new instance of the class.
///
public DeleteLogViewerQueryFile(IMigrationContext context, IHostingEnvironment hostingEnvironment)
+ : base(context)
{
_hostingEnvironment = hostingEnvironment;
}
///
- public void Migrate()
+ protected override void Migrate()
{
var logViewerQueryFile = MigrateLogViewerQueriesFromFileToDb.GetLogViewerQueryFile(_hostingEnvironment);
diff --git a/src/Umbraco.Infrastructure/Migrations/PostMigrations/RebuildPublishedSnapshot.cs b/src/Umbraco.Infrastructure/Migrations/PostMigrations/RebuildPublishedSnapshot.cs
index bbf366882f..e2de75b7ec 100644
--- a/src/Umbraco.Infrastructure/Migrations/PostMigrations/RebuildPublishedSnapshot.cs
+++ b/src/Umbraco.Infrastructure/Migrations/PostMigrations/RebuildPublishedSnapshot.cs
@@ -1,11 +1,9 @@
-using Umbraco.Cms.Core.Migrations;
-
namespace Umbraco.Cms.Infrastructure.Migrations.PostMigrations
{
///
/// Rebuilds the published snapshot.
///
- public class RebuildPublishedSnapshot : IMigration
+ public class RebuildPublishedSnapshot : MigrationBase
{
private readonly IPublishedSnapshotRebuilder _rebuilder;
@@ -13,14 +11,10 @@ namespace Umbraco.Cms.Infrastructure.Migrations.PostMigrations
/// Initializes a new instance of the class.
///
public RebuildPublishedSnapshot(IMigrationContext context, IPublishedSnapshotRebuilder rebuilder)
- {
- _rebuilder = rebuilder;
- }
+ : base(context)
+ => _rebuilder = rebuilder;
///
- public void Migrate()
- {
- _rebuilder.Rebuild();
- }
+ protected override void Migrate() => _rebuilder.Rebuild();
}
}
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/CreateKeysAndIndexes.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/CreateKeysAndIndexes.cs
index 5bd7ddbf2b..bacd875f3f 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/CreateKeysAndIndexes.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/CreateKeysAndIndexes.cs
@@ -1,4 +1,4 @@
-using Umbraco.Cms.Infrastructure.Migrations.Install;
+using Umbraco.Cms.Infrastructure.Migrations.Install;
namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.Common
{
@@ -8,7 +8,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.Common
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
// remove those that may already have keys
Delete.KeysAndIndexes(Cms.Core.Constants.DatabaseSchema.Tables.KeyValue).Do();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/DeleteKeysAndIndexes.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/DeleteKeysAndIndexes.cs
index e36af3bfa4..14e4a5236a 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/DeleteKeysAndIndexes.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/DeleteKeysAndIndexes.cs
@@ -6,7 +6,7 @@
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
// all v7.14 tables
var tables = new[]
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
index 56555fe006..9208b2ec19 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
@@ -201,18 +201,26 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade
// to 8.10.0
To("{D6A8D863-38EC-44FB-91EC-ACD6A668BD18}");
+ // NOTE: we need to do a merge migration here because as of 'now',
+ // v9-beta* is already out and 8.15 isn't out yet
+ // so we need to ensure that migrations from 8.15 are included in the next
+ // v9*.
+
// to 8.15.0...
- To("{8DDDCD0B-D7D5-4C97-BD6A-6B38CA65752F}");
- To("{4695D0C9-0729-4976-985B-048D503665D8}");
-
+ Merge()
+ .To("{8DDDCD0B-D7D5-4C97-BD6A-6B38CA65752F}")
+ .To("{4695D0C9-0729-4976-985B-048D503665D8}")
+
// to 9.0.0
- To("{22D801BA-A1FF-4539-BFCC-2139B55594F8}");
- To("{50A43237-A6F4-49E2-A7A6-5DAD65C84669}");
- To("{3D8DADEF-0FDA-4377-A5F0-B52C2110E8F2}");
- To("{1303BDCF-2295-4645-9526-2F32E8B35ABD}");
- To("{86AC839A-0D08-4D09-B7B5-027445E255A1}");
+ .With()
+ .To("{22D801BA-A1FF-4539-BFCC-2139B55594F8}")
+ .To("{50A43237-A6F4-49E2-A7A6-5DAD65C84669}")
+ .To("{3D8DADEF-0FDA-4377-A5F0-B52C2110E8F2}")
+ .To("{1303BDCF-2295-4645-9526-2F32E8B35ABD}")
+ .To("{86AC839A-0D08-4D09-B7B5-027445E255A1}")
//FINAL
+ .As("{5060F3D2-88BE-4D30-8755-CF51F28EAD12}");
}
}
}
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentNuTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentNuTable.cs
index 35552e4c0e..b53fd867b2 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentNuTable.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentNuTable.cs
@@ -1,4 +1,4 @@
-using Umbraco.Cms.Infrastructure.Persistence.Dtos;
+using Umbraco.Cms.Infrastructure.Persistence.Dtos;
using Umbraco.Extensions;
namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
@@ -9,7 +9,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
var tables = SqlSyntax.GetTablesInSchema(Context.Database);
if (tables.InvariantContains("cmsContentNu")) return;
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentTypeIsElementColumn.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentTypeIsElementColumn.cs
index d0425dcb76..28f6e8e6de 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentTypeIsElementColumn.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentTypeIsElementColumn.cs
@@ -7,7 +7,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
public AddContentTypeIsElementColumn(IMigrationContext context) : base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
AddColumn("isElement");
}
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLockObjects.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLockObjects.cs
index de6889c157..f8332fb0e2 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLockObjects.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLockObjects.cs
@@ -9,7 +9,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
// some may already exist, just ensure everything we need is here
EnsureLockObject(Cms.Core.Constants.Locks.Servers, "Servers");
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLogTableColumns.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLogTableColumns.cs
index 8cd193bb2c..4ef9d4ff14 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLogTableColumns.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLogTableColumns.cs
@@ -9,7 +9,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToList();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddPackagesSectionAccess.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddPackagesSectionAccess.cs
index 8ca31127d1..fc708b1f4b 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddPackagesSectionAccess.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddPackagesSectionAccess.cs
@@ -6,7 +6,7 @@
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
// Any user group which had access to the Developer section should have access to Packages
Database.Execute($@"
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddTypedLabels.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddTypedLabels.cs
index 68b7d1524b..87d6edbc9f 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddTypedLabels.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddTypedLabels.cs
@@ -13,7 +13,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
// insert other label datatypes
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs
index 327a5df4da..465b17d7fc 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs
@@ -14,7 +14,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
//
// this is taking care of ppl left in this state
- public override void Migrate()
+ protected override void Migrate()
{
// note - original AddVariationTables1 just did
// Create.Table().Do();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs
index dfe8cccfc7..263dffd2b9 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
Create.Table(true).Do();
Create.Table(true).Do();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ContentVariationMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ContentVariationMigration.cs
index 8e8111a04c..6171c3df13 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ContentVariationMigration.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ContentVariationMigration.cs
@@ -10,7 +10,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
byte GetNewValue(byte oldValue)
{
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs
index 71818fe285..4e277262a7 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs
@@ -14,7 +14,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
public ConvertRelatedLinksToMultiUrlPicker(IMigrationContext context) : base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
var sqlDataTypes = Sql()
.Select()
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs
index 30957e949a..c254ecc8df 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs
@@ -43,7 +43,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
_configurationEditorJsonSerializer = configurationEditorJsonSerializer;
}
- public override void Migrate()
+ protected override void Migrate()
{
// drop and create columns
Delete.Column("pk").FromTable("cmsDataType").Do();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs
index f55ebbbddc..a03c87159b 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs
@@ -24,7 +24,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
_configurationEditorJsonSerializer = configurationEditorJsonSerializer;
}
- public override void Migrate()
+ protected override void Migrate()
{
var refreshCache = Migrate(GetDataTypes(".DropDown", false));
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropMigrationsTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropMigrationsTable.cs
index a80d3936e1..0d1e0506cb 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropMigrationsTable.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropMigrationsTable.cs
@@ -6,7 +6,7 @@
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
if (TableExists("umbracoMigration"))
Delete.Table("umbracoMigration").Do();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropPreValueTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropPreValueTable.cs
index 1d5237ab94..0195e51e6e 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropPreValueTable.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropPreValueTable.cs
@@ -5,7 +5,7 @@
public DropPreValueTable(IMigrationContext context) : base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
// drop preValues table
if (TableExists("cmsDataTypePreValues"))
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTaskTables.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTaskTables.cs
index e830bddf92..b4004c1c82 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTaskTables.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTaskTables.cs
@@ -6,7 +6,7 @@
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
if (TableExists("cmsTask"))
Delete.Table("cmsTask").Do();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTemplateDesignColumn.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTemplateDesignColumn.cs
index 89dd26beed..9f65689a59 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTemplateDesignColumn.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTemplateDesignColumn.cs
@@ -6,7 +6,7 @@
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
if(ColumnExists("cmsTemplate", "design"))
Delete.Column("design").FromTable("cmsTemplate").Do();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs
index 81581c48cd..3e86e142aa 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs
@@ -6,7 +6,7 @@
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
if (TableExists("cmsContentXml"))
Delete.Table("cmsContentXml").Do();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FallbackLanguage.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FallbackLanguage.cs
index c1761f74f2..48e00df2ff 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FallbackLanguage.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FallbackLanguage.cs
@@ -14,7 +14,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FixLanguageIsoCodeLength.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FixLanguageIsoCodeLength.cs
index 24e820e816..7a35dc12ed 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FixLanguageIsoCodeLength.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FixLanguageIsoCodeLength.cs
@@ -6,7 +6,7 @@
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
// there is some confusion here when upgrading from v7
// it should be 14 already but that's not always the case
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/LanguageColumns.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/LanguageColumns.cs
index bb69922721..f6aa86259f 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/LanguageColumns.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/LanguageColumns.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
AddColumn(Cms.Core.Constants.DatabaseSchema.Tables.Language, "isDefaultVariantLang");
AddColumn(Cms.Core.Constants.DatabaseSchema.Tables.Language, "mandatory");
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeRedirectUrlVariant.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeRedirectUrlVariant.cs
index 5cc7a0e6b5..7958f4fbf8 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeRedirectUrlVariant.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeRedirectUrlVariant.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
AddColumn("culture");
}
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeTagsVariant.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeTagsVariant.cs
index 3a5db9c1e6..74cdd88357 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeTagsVariant.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeTagsVariant.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
AddColumn("languageId");
}
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs
index 287e4d8d15..a324204921 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs
@@ -21,7 +21,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
_configurationEditorJsonSerializer = configurationEditorJsonSerializer;
}
- public override void Migrate()
+ protected override void Migrate()
{
var dataTypes = GetDataTypes(Cms.Core.Constants.PropertyEditors.Legacy.Aliases.Date);
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs
index b3ac352e67..935d51dacd 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs
@@ -10,7 +10,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
RenameDataType(Cms.Core.Constants.PropertyEditors.Legacy.Aliases.ContentPicker2, Cms.Core.Constants.PropertyEditors.Aliases.ContentPicker);
RenameDataType(Cms.Core.Constants.PropertyEditors.Legacy.Aliases.MediaPicker2, Cms.Core.Constants.PropertyEditors.Aliases.MediaPicker);
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs
index ee9a61e0c1..1dc0b7f2c3 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs
@@ -27,7 +27,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
_configurationEditorJsonSerializer = configurationEditorJsonSerializer;
}
- public override void Migrate()
+ protected override void Migrate()
{
var refreshCache = false;
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs
index fc03d18584..005a2ef464 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
if (ColumnExists(Cms.Core.Constants.DatabaseSchema.Tables.Macro, "macroXSLT"))
{
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorVariantsModel.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorVariantsModel.cs
index a444831c90..a7759e557c 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorVariantsModel.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorVariantsModel.cs
@@ -9,7 +9,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
if (ColumnExists(Cms.Core.Constants.DatabaseSchema.Tables.ContentVersionCultureVariation, "edited"))
Delete.Column("edited").FromTable(Cms.Core.Constants.DatabaseSchema.Tables.ContentVersionCultureVariation).Do();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameLabelAndRichTextPropertyEditorAliases.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameLabelAndRichTextPropertyEditorAliases.cs
index d5e47c54d2..c3fdf2d0fc 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameLabelAndRichTextPropertyEditorAliases.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameLabelAndRichTextPropertyEditorAliases.cs
@@ -11,7 +11,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
{
}
- public override void Migrate()
+ protected override void Migrate()
{
MigratePropertyEditorAlias("Umbraco.TinyMCEv3", Cms.Core.Constants.PropertyEditors.Aliases.TinyMce);
MigratePropertyEditorAlias("Umbraco.NoEdit", Cms.Core.Constants.PropertyEditors.Aliases.Label);
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameMediaVersionTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameMediaVersionTable.cs
index cedbb97666..632b6f8a6c 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameMediaVersionTable.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameMediaVersionTable.cs
@@ -9,7 +9,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
Rename.Table("cmsMedia").To(Cms.Core.Constants.DatabaseSchema.Tables.MediaVersion).Do();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameUmbracoDomainsTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameUmbracoDomainsTable.cs
index 9e89678e11..8bb2a8c14c 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameUmbracoDomainsTable.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameUmbracoDomainsTable.cs
@@ -6,7 +6,7 @@
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
Rename.Table("umbracoDomains").To(Cms.Core.Constants.DatabaseSchema.Tables.Domain).Do();
}
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/SuperZero.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/SuperZero.cs
index 2d3c7264b6..4daab69962 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/SuperZero.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/SuperZero.cs
@@ -6,7 +6,7 @@
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
var exists = Database.Fetch("select id from umbracoUser where id=-1;").Count > 0;
if (exists) return;
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TablesForScheduledPublishing.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TablesForScheduledPublishing.cs
index db16e47701..531e7a06cc 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TablesForScheduledPublishing.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TablesForScheduledPublishing.cs
@@ -11,7 +11,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
//Get anything currently scheduled
var releaseSql = new Sql()
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigration.cs
index b90066c64a..35c32bddb9 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigration.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigration.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
// alter columns => non-null
AlterColumn(Cms.Core.Constants.DatabaseSchema.Tables.Tag, "group");
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigrationFix.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigrationFix.cs
index f4e37914a9..63ffd563a9 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigrationFix.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigrationFix.cs
@@ -6,7 +6,7 @@
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
// kill unused parentId column, if it still exists
if (ColumnExists(Cms.Core.Constants.DatabaseSchema.Tables.Tag, "ParentId"))
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdateDefaultMandatoryLanguage.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdateDefaultMandatoryLanguage.cs
index ddf3dfbcb5..e3251dc6ed 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdateDefaultMandatoryLanguage.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdateDefaultMandatoryLanguage.cs
@@ -9,7 +9,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
// add the new languages lock object
AddLockObjects.EnsureLockObject(Database, Cms.Core.Constants.Locks.Languages, "Languages");
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs
index 031d65dc73..cea0fbdd23 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs
@@ -13,7 +13,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
public UpdatePickerIntegerValuesToUdi(IMigrationContext context) : base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
var sqlDataTypes = Sql()
.Select()
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UserForeignKeys.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UserForeignKeys.cs
index f29526b8ce..03c3529f59 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UserForeignKeys.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UserForeignKeys.cs
@@ -11,7 +11,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
// first allow NULL-able
Alter.Table(ContentVersionCultureVariationDto.TableName).AlterColumn("availableUserId").AsInt32().Nullable().Do();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/VariantsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/VariantsMigration.cs
index d9e6109373..8dbc7d59b3 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/VariantsMigration.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/VariantsMigration.cs
@@ -17,7 +17,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
// notes
// do NOT use Rename.Column as it's borked on SQLCE - use ReplaceColumn instead
- public override void Migrate()
+ protected override void Migrate()
{
MigratePropertyData();
CreatePropertyDataIndexes();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_1/ChangeNuCacheJsonFormat.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_1/ChangeNuCacheJsonFormat.cs
index e0ba4c2403..74445d268d 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_1/ChangeNuCacheJsonFormat.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_1/ChangeNuCacheJsonFormat.cs
@@ -7,7 +7,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_1
public ChangeNuCacheJsonFormat(IMigrationContext context) : base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
// nothing - just adding the post-migration
Context.AddPostMigration();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_10_0/AddPropertyTypeLabelOnTopColumn.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_10_0/AddPropertyTypeLabelOnTopColumn.cs
index a8ecebbf99..6c6fd6166c 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_10_0/AddPropertyTypeLabelOnTopColumn.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_10_0/AddPropertyTypeLabelOnTopColumn.cs
@@ -10,7 +10,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_10_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToList();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_15_0/AddCmsContentNuByteColumn.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_15_0/AddCmsContentNuByteColumn.cs
index d73e617e45..2f0caa4939 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_15_0/AddCmsContentNuByteColumn.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_15_0/AddCmsContentNuByteColumn.cs
@@ -1,4 +1,5 @@
using System.Linq;
+using Umbraco.Cms.Core;
using Umbraco.Cms.Infrastructure.Persistence.Dtos;
namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_15_0
@@ -11,11 +12,14 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_15_0
}
- public override void Migrate()
+ protected override void Migrate()
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToList();
AddColumnIfNotExists(columns, "dataRaw");
+
+ // allow null
+ AlterColumn(Constants.DatabaseSchema.Tables.NodeData, "data");
}
}
}
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_15_0/UpgradedIncludeIndexes.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_15_0/UpgradedIncludeIndexes.cs
index e7989962b8..9bdce9bfbf 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_15_0/UpgradedIncludeIndexes.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_15_0/UpgradedIncludeIndexes.cs
@@ -14,7 +14,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_15_0
}
- public override void Migrate()
+ protected override void Migrate()
{
// Need to drop the FK for the redirect table before modifying the unique id index
Delete.ForeignKey()
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/ConvertTinyMceAndGridMediaUrlsToLocalLink.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/ConvertTinyMceAndGridMediaUrlsToLocalLink.cs
index 3de504f48a..3f5a966544 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/ConvertTinyMceAndGridMediaUrlsToLocalLink.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/ConvertTinyMceAndGridMediaUrlsToLocalLink.cs
@@ -21,7 +21,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_1_0
_mediaService = mediaService ?? throw new ArgumentNullException(nameof(mediaService));
}
- public override void Migrate()
+ protected override void Migrate()
{
var mediaLinkPattern = new Regex(
@"(]*href="")(\/ media[^""\?]*)([^>]*>)",
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/FixContentNuCascade.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/FixContentNuCascade.cs
index 839baadec6..00389c547e 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/FixContentNuCascade.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/FixContentNuCascade.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_1_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
Delete.KeysAndIndexes().Do();
Create.KeysAndIndexes().Do();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/RenameUserLoginDtoDateIndex.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/RenameUserLoginDtoDateIndex.cs
index a88426966d..f06477579a 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/RenameUserLoginDtoDateIndex.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/RenameUserLoginDtoDateIndex.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_1_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
// there has been some confusion with an index name, resulting in
// different names depending on which migration path was followed,
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddMainDomLock.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddMainDomLock.cs
index 00e781c8b2..9fe257fafe 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddMainDomLock.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddMainDomLock.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_6_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
Database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Cms.Core.Constants.Locks.MainDom, Name = "MainDom" });
}
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddNewRelationTypes.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddNewRelationTypes.cs
index 5feb6d887a..9c770adf15 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddNewRelationTypes.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddNewRelationTypes.cs
@@ -11,7 +11,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_6_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
CreateRelation(
Cms.Core.Constants.Conventions.RelationTypes.RelatedMediaAlias,
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddPropertyTypeValidationMessageColumns.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddPropertyTypeValidationMessageColumns.cs
index 63c4efa49c..9a9e2b5e77 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddPropertyTypeValidationMessageColumns.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddPropertyTypeValidationMessageColumns.cs
@@ -10,7 +10,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_6_0
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToList();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/MissingContentVersionsIndexes.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/MissingContentVersionsIndexes.cs
index 68c7d1a174..2d4b227249 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/MissingContentVersionsIndexes.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/MissingContentVersionsIndexes.cs
@@ -10,7 +10,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_6_0
{
}
- public override void Migrate()
+ protected override void Migrate()
{
// We must check before we create an index because if we are upgrading from v7 we force re-create all
// indexes in the whole DB and then this would throw
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/UpdateRelationTypeTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/UpdateRelationTypeTable.cs
index 10b741bae8..bc3757eaad 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/UpdateRelationTypeTable.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/UpdateRelationTypeTable.cs
@@ -7,7 +7,7 @@
: base(context)
{ }
- public override void Migrate()
+ protected override void Migrate()
{
Alter.Table(Cms.Core.Constants.DatabaseSchema.Tables.RelationType).AlterColumn("parentObjectType").AsGuid().Nullable().Do();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_7_0/MissingDictionaryIndex.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_7_0/MissingDictionaryIndex.cs
index 287cb94edb..69e4a7423c 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_7_0/MissingDictionaryIndex.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_7_0/MissingDictionaryIndex.cs
@@ -14,7 +14,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_7_0
/// Adds an index to the foreign key column parent on DictionaryDto's table
/// if it doesn't already exist
///
- public override void Migrate()
+ protected override void Migrate()
{
var indexName = "IX_" + DictionaryDto.TableName + "_Parent";
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_9_0/ExternalLoginTableUserData.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_9_0/ExternalLoginTableUserData.cs
index 6865a35b7a..7f75bde572 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_9_0/ExternalLoginTableUserData.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_9_0/ExternalLoginTableUserData.cs
@@ -12,7 +12,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_9_0
///
/// Adds new column to the External Login table
///
- public override void Migrate()
+ protected override void Migrate()
{
AddColumn(Cms.Core.Constants.DatabaseSchema.Tables.ExternalLogin, "userData");
}
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/AddPasswordConfigToMemberTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/AddPasswordConfigToMemberTable.cs
index e01fb2eaab..01ea1cf3b3 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/AddPasswordConfigToMemberTable.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/AddPasswordConfigToMemberTable.cs
@@ -13,7 +13,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_9_0_0
///
/// Adds new columns to members table
///
- public override void Migrate()
+ protected override void Migrate()
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToList();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/ExternalLoginTableIndexes.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/ExternalLoginTableIndexes.cs
index cf1124c4d9..ef29207093 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/ExternalLoginTableIndexes.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/ExternalLoginTableIndexes.cs
@@ -14,7 +14,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_9_0_0
///
/// Adds new indexes to the External Login table
///
- public override void Migrate()
+ protected override void Migrate()
{
// Before adding these indexes we need to remove duplicate data.
// Get all logins by latest
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/ExternalLoginTokenTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/ExternalLoginTokenTable.cs
index 418f0c3275..8dd43f1834 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/ExternalLoginTokenTable.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/ExternalLoginTokenTable.cs
@@ -15,7 +15,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_9_0_0
///
/// Adds new External Login token table
///
- public override void Migrate()
+ protected override void Migrate()
{
IEnumerable tables = SqlSyntax.GetTablesInSchema(Context.Database);
if (tables.InvariantContains(ExternalLoginTokenDto.TableName))
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/MemberTableColumns.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/MemberTableColumns.cs
index bf26e97540..5dd274ad05 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/MemberTableColumns.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/MemberTableColumns.cs
@@ -13,7 +13,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_9_0_0
///
/// Adds new columns to members table
///
- public override void Migrate()
+ protected override void Migrate()
{
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToList();
diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/MigrateLogViewerQueriesFromFileToDb.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/MigrateLogViewerQueriesFromFileToDb.cs
index 0211e6b108..2eeca8804d 100644
--- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/MigrateLogViewerQueriesFromFileToDb.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_9_0_0/MigrateLogViewerQueriesFromFileToDb.cs
@@ -63,7 +63,7 @@ namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_9_0_0
_hostingEnvironment = hostingEnvironment;
}
- public override void Migrate()
+ protected override void Migrate()
{
CreateDatabaseTable();
MigrateFileContentToDB();
diff --git a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs
index a864f536b0..24548fd36b 100644
--- a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs
+++ b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
@@ -357,7 +357,7 @@ namespace Umbraco.Cms.Infrastructure.Persistence.SqlSyntax
sql.Append(" ");
sql.Append(FormatIdentity(column));
- var isNullable = column.IsNullable;
+ //var isNullable = column.IsNullable;
//var constraint = FormatConstraint(column)?.TrimStart("CONSTRAINT ");
//var hasConstraint = !string.IsNullOrWhiteSpace(constraint);
@@ -365,11 +365,14 @@ namespace Umbraco.Cms.Infrastructure.Persistence.SqlSyntax
//var defaultValue = FormatDefaultValue(column);
//var hasDefaultValue = !string.IsNullOrWhiteSpace(defaultValue);
- if (isNullable /*&& !hasConstraint && !hasDefaultValue*/)
- {
- sqls = Enumerable.Empty();
- return sql.ToString();
- }
+ // TODO: This used to exit if nullable but that means this would never work
+ // to return SQL if the column was nullable?!? I don't get it. This was here
+ // 4 years ago, I've removed it so that this works for nullable columns.
+ //if (isNullable /*&& !hasConstraint && !hasDefaultValue*/)
+ //{
+ // sqls = Enumerable.Empty();
+ // return sql.ToString();
+ //}
var msql = new List();
sqls = msql;
diff --git a/src/Umbraco.Infrastructure/RuntimeState.cs b/src/Umbraco.Infrastructure/RuntimeState.cs
index 894536e4e7..b3fccd5fd5 100644
--- a/src/Umbraco.Infrastructure/RuntimeState.cs
+++ b/src/Umbraco.Infrastructure/RuntimeState.cs
@@ -141,10 +141,6 @@ namespace Umbraco.Cms.Core
case UmbracoDatabaseState.Ok:
default:
{
- // if we already know we want to upgrade, exit here
- if (Level == RuntimeLevel.Upgrade)
- return;
-
// the database version matches the code & files version, all clear, can run
Level = RuntimeLevel.Run;
Reason = RuntimeLevelReason.Run;
diff --git a/src/Umbraco.PublishedCache.NuCache/NuCacheStartupHandler.cs b/src/Umbraco.PublishedCache.NuCache/NuCacheStartupHandler.cs
index 403b83803b..fa5f183efc 100644
--- a/src/Umbraco.PublishedCache.NuCache/NuCacheStartupHandler.cs
+++ b/src/Umbraco.PublishedCache.NuCache/NuCacheStartupHandler.cs
@@ -1,10 +1,7 @@
-using System.Configuration;
-using Microsoft.Extensions.Logging;
using Umbraco.Cms.Core.Events;
-using Umbraco.Cms.Core.Logging;
using Umbraco.Cms.Core.Notifications;
-using Umbraco.Cms.Core.PublishedCache;
using Umbraco.Cms.Core.Services;
+using Umbraco.Cms.Infrastructure.PublishedCache.Persistence;
namespace Umbraco.Cms.Infrastructure.PublishedCache
{
@@ -13,55 +10,25 @@ namespace Umbraco.Cms.Infrastructure.PublishedCache
///
public class NuCacheStartupHandler : INotificationHandler
{
- // TODO: Eventually we should kill this since at some stage we shouldn't even support JSON since we know
- // this is faster.
-
- internal const string Nucache_Serializer_Key = "Umbraco.Web.PublishedCache.NuCache.Serializer";
- private const string JSON_SERIALIZER_VALUE = "JSON";
- private readonly IPublishedSnapshotService _service;
- private readonly IKeyValueService _keyValueService;
- private readonly IProfilingLogger _profilingLogger;
- private readonly ILogger _logger;
+ private readonly INuCacheContentService _nuCacheContentService;
+ private readonly IRuntimeState _runtimeState;
public NuCacheStartupHandler(
- IPublishedSnapshotService service,
- IKeyValueService keyValueService,
- IProfilingLogger profilingLogger,
- ILogger logger)
+ INuCacheContentService nuCacheContentService,
+ IRuntimeState runtimeState)
{
- _service = service;
- _keyValueService = keyValueService;
- _profilingLogger = profilingLogger;
- _logger = logger;
+ _nuCacheContentService = nuCacheContentService;
+ _runtimeState = runtimeState;
}
public void Handle(UmbracoApplicationStartingNotification notification)
- => RebuildDatabaseCacheIfSerializerChanged();
-
- private void RebuildDatabaseCacheIfSerializerChanged()
{
- var serializer = ConfigurationManager.AppSettings[Nucache_Serializer_Key];
- var currentSerializer = _keyValueService.GetValue(Nucache_Serializer_Key);
-
- if (currentSerializer == null)
+ if (_runtimeState.Level == Core.RuntimeLevel.Run)
{
- currentSerializer = JSON_SERIALIZER_VALUE;
- }
- if (serializer == null)
- {
- serializer = JSON_SERIALIZER_VALUE;
- }
-
- if (serializer != currentSerializer)
- {
- _logger.LogWarning("Database NuCache was serialized using {CurrentSerializer}. Currently configured NuCache serializer {Serializer}. Rebuilding Nucache", currentSerializer, serializer);
-
- using (_profilingLogger.TraceDuration($"Rebuilding NuCache database with {currentSerializer} serializer"))
- {
- _service.Rebuild();
- _keyValueService.SetValue(Nucache_Serializer_Key, serializer);
- }
+ _nuCacheContentService.RebuildDatabaseCacheIfSerializerChanged();
}
}
+
+
}
}
diff --git a/src/Umbraco.PublishedCache.NuCache/Persistence/INuCacheContentService.cs b/src/Umbraco.PublishedCache.NuCache/Persistence/INuCacheContentService.cs
index 6cba88da40..78ab94fddb 100644
--- a/src/Umbraco.PublishedCache.NuCache/Persistence/INuCacheContentService.cs
+++ b/src/Umbraco.PublishedCache.NuCache/Persistence/INuCacheContentService.cs
@@ -8,6 +8,12 @@ namespace Umbraco.Cms.Infrastructure.PublishedCache.Persistence
///
public interface INuCacheContentService
{
+ ///
+ /// Used during startup to see if the configured serialized is different from the persisted serialize type.
+ /// If they are different, this will rebuild the nucache DB table with the configured serializer.
+ ///
+ void RebuildDatabaseCacheIfSerializerChanged();
+
// TODO: For these required sort orders, would sorting on Path 'just work'?
ContentNodeKit GetContentSource(int id);
diff --git a/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs b/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs
index fb991a666a..a141872957 100644
--- a/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs
+++ b/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs
@@ -128,6 +128,8 @@ namespace Umbraco.Cms.Infrastructure.PublishedCache.Persistence
RebuildContentDbCache(serializer, _nucacheSettings.Value.SqlPageSize, contentTypeIds);
RebuildMediaDbCache(serializer, _nucacheSettings.Value.SqlPageSize, mediaTypeIds);
RebuildMemberDbCache(serializer, _nucacheSettings.Value.SqlPageSize, memberTypeIds);
+
+
}
// assumes content tree lock
diff --git a/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentService.cs b/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentService.cs
index 0c28b8a6e4..a86d412d13 100644
--- a/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentService.cs
+++ b/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentService.cs
@@ -1,9 +1,14 @@
+using System;
using System.Collections.Generic;
using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
using Umbraco.Cms.Core;
+using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Events;
+using Umbraco.Cms.Core.Logging;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Scoping;
+using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.Implement;
namespace Umbraco.Cms.Infrastructure.PublishedCache.Persistence
@@ -11,15 +16,45 @@ namespace Umbraco.Cms.Infrastructure.PublishedCache.Persistence
public class NuCacheContentService : RepositoryService, INuCacheContentService
{
private readonly INuCacheContentRepository _repository;
+ private readonly IKeyValueService _keyValueService;
+ private readonly IProfilingLogger _profilingLogger;
+ private readonly IOptions _nucacheSettings;
+ private readonly ILogger _logger;
+ private const string NuCacheSerializerKey = "Umbraco.Web.PublishedCache.NuCache.Serializer";
public NuCacheContentService(
INuCacheContentRepository repository,
+ IKeyValueService keyValueService,
IScopeProvider provider,
ILoggerFactory loggerFactory,
- IEventMessagesFactory eventMessagesFactory)
+ IProfilingLogger profilingLogger,
+ IEventMessagesFactory eventMessagesFactory,
+ IOptions nucacheSettings)
: base(provider, loggerFactory, eventMessagesFactory)
{
_repository = repository;
+ _keyValueService = keyValueService;
+ _profilingLogger = profilingLogger;
+ _nucacheSettings = nucacheSettings;
+ _logger = loggerFactory.CreateLogger();
+ }
+
+ public void RebuildDatabaseCacheIfSerializerChanged()
+ {
+ NuCacheSerializerType serializer = _nucacheSettings.Value.NuCacheSerializerType;
+ var currentSerializerValue = _keyValueService.GetValue(NuCacheSerializerKey);
+
+ if (!Enum.TryParse(currentSerializerValue, out NuCacheSerializerType currentSerializer)
+ || serializer != currentSerializer)
+ {
+ _logger.LogWarning("Database NuCache was serialized using {CurrentSerializer}. Currently configured NuCache serializer {Serializer}. Rebuilding Nucache", currentSerializer, serializer);
+
+ using (_profilingLogger.TraceDuration($"Rebuilding NuCache database with {serializer} serializer"))
+ {
+ Rebuild();
+ _keyValueService.SetValue(NuCacheSerializerKey, serializer.ToString());
+ }
+ }
}
///
@@ -92,6 +127,11 @@ namespace Umbraco.Cms.Infrastructure.PublishedCache.Persistence
scope.ReadLock(Constants.Locks.MemberTree);
_repository.Rebuild(contentTypeIds, mediaTypeIds, memberTypeIds);
+
+ // Save a key/value of the serialized type. This is used during startup to see
+ // if the serialized type changed and if so it will rebuild with the correct type.
+ _keyValueService.SetValue(NuCacheSerializerKey, _nucacheSettings.Value.NuCacheSerializerType.ToString());
+
scope.Complete();
}
}
diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Migrations/AdvancedMigrationTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Migrations/AdvancedMigrationTests.cs
index 5ecf2f5503..6a802b6712 100644
--- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Migrations/AdvancedMigrationTests.cs
+++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Migrations/AdvancedMigrationTests.cs
@@ -204,7 +204,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Migrations
{
}
- public override void Migrate() =>
+ protected override void Migrate() =>
// Create User table with keys, indexes, etc.
Create.Table().Do();
@@ -217,7 +217,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Migrations
{
}
- public override void Migrate()
+ protected override void Migrate()
{
// drops User table keys and indexes
// Execute.DropKeysAndIndexes("umbracoUser");
@@ -243,7 +243,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Migrations
{
}
- public override void Migrate() =>
+ protected override void Migrate() =>
// Create User table keys and indexes.
Create.KeysAndIndexes().Do();
@@ -256,7 +256,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Migrations
{
}
- public override void Migrate()
+ protected override void Migrate()
{
// Creates *all* tables keys and indexes
foreach (Type x in DatabaseSchemaCreator.OrderedTables)
@@ -279,7 +279,7 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Migrations
{
}
- public override void Migrate()
+ protected override void Migrate()
{
// cannot delete the column without this, of course
Delete.KeysAndIndexes("umbracoUser").Do();
diff --git a/src/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj b/src/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj
index 915d691909..687df3b46a 100644
--- a/src/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj
+++ b/src/Umbraco.Tests.Integration/Umbraco.Tests.Integration.csproj
@@ -12,11 +12,17 @@
+
+
+
+
+
+
@@ -80,10 +86,6 @@
-
-
-
-
diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/AlterMigrationTests.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/AlterMigrationTests.cs
index bfe11a9878..c0c27f6837 100644
--- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/AlterMigrationTests.cs
+++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/AlterMigrationTests.cs
@@ -27,7 +27,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
var stub = new DropForeignKeyMigrationStub(context);
// Act
- stub.Migrate();
+ stub.Run();
foreach (TestDatabase.Operation op in database.Operations)
{
@@ -48,7 +48,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
var context = new MigrationContext(database, _logger);
var migration = new CreateColumnMigration(context);
- migration.Migrate();
+ migration.Run();
foreach (TestDatabase.Operation op in database.Operations)
{
@@ -68,7 +68,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
{
}
- public override void Migrate() => Alter.Table("bar").AddColumn("foo").AsGuid().Do();
+ protected override void Migrate() => Alter.Table("bar").AddColumn("foo").AsGuid().Do();
}
[Test]
@@ -78,7 +78,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
var context = new MigrationContext(database, _logger);
var migration = new AlterColumnMigration(context);
- migration.Migrate();
+ migration.Run();
foreach (TestDatabase.Operation op in database.Operations)
{
@@ -98,7 +98,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
{
}
- public override void Migrate() =>
+ protected override void Migrate() =>
// bad/good syntax...
//// Alter.Column("foo").OnTable("bar").AsGuid().NotNullable();
@@ -115,7 +115,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
var stub = new AlterUserTableMigrationStub(context);
// Act
- stub.Migrate();
+ stub.Run();
// Assert
Assert.That(database.Operations.Any(), Is.True);
diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/MigrationPlanTests.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/MigrationPlanTests.cs
index c6090a7bc2..7b9e9bf045 100644
--- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/MigrationPlanTests.cs
+++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/MigrationPlanTests.cs
@@ -11,7 +11,6 @@ using Moq;
using NPoco;
using NUnit.Framework;
using Umbraco.Cms.Core.Configuration.Models;
-using Umbraco.Cms.Core.Migrations;
using Umbraco.Cms.Core.Scoping;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Infrastructure.Migrations;
@@ -51,7 +50,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
case "DeleteRedirectUrlTable":
return new DeleteRedirectUrlTable(c);
case "NoopMigration":
- return new NoopMigration();
+ return new NoopMigration(c);
default:
throw new NotSupportedException();
}
@@ -227,7 +226,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
{
}
- public override void Migrate() => Delete.Table("umbracoRedirectUrl").Do();
+ protected override void Migrate() => Delete.Table("umbracoRedirectUrl").Do();
}
}
}
diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/MigrationTests.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/MigrationTests.cs
index f118de46e0..67c1108696 100644
--- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/MigrationTests.cs
+++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/MigrationTests.cs
@@ -10,7 +10,6 @@ using Microsoft.Extensions.Logging;
using Moq;
using NUnit.Framework;
using Umbraco.Cms.Core.Events;
-using Umbraco.Cms.Core.Migrations;
using Umbraco.Cms.Core.Scoping;
using Umbraco.Cms.Infrastructure.Migrations;
using Umbraco.Cms.Infrastructure.Persistence;
@@ -64,8 +63,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
{
var migrationContext =
new MigrationContext(Mock.Of(), Mock.Of>());
- IMigration migration = new GoodMigration(migrationContext);
- migration.Migrate();
+ MigrationBase migration = new GoodMigration(migrationContext);
+ migration.Run();
}
[Test]
@@ -73,8 +72,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
{
var migrationContext =
new MigrationContext(Mock.Of(), Mock.Of>());
- IMigration migration = new BadMigration1(migrationContext);
- Assert.Throws(() => migration.Migrate());
+ MigrationBase migration = new BadMigration1(migrationContext);
+ Assert.Throws(() => migration.Run());
}
[Test]
@@ -82,8 +81,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
{
var migrationContext =
new MigrationContext(Mock.Of(), Mock.Of>());
- IMigration migration = new BadMigration2(migrationContext);
- Assert.Throws(() => migration.Migrate());
+ MigrationBase migration = new BadMigration2(migrationContext);
+ Assert.Throws(() => migration.Run());
}
public class GoodMigration : MigrationBase
@@ -93,7 +92,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
{
}
- public override void Migrate() => Execute.Sql(string.Empty).Do();
+ protected override void Migrate() => Execute.Sql(string.Empty).Do();
}
public class BadMigration1 : MigrationBase
@@ -103,7 +102,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
{
}
- public override void Migrate() => Alter.Table("foo"); // stop here, don't Do it
+ protected override void Migrate() => Alter.Table("foo"); // stop here, don't Do it
}
public class BadMigration2 : MigrationBase
@@ -113,7 +112,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
{
}
- public override void Migrate()
+ protected override void Migrate()
{
Alter.Table("foo"); // stop here, don't Do it
diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/PostMigrationTests.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/PostMigrationTests.cs
index 4b1e2aa526..2f47151b79 100644
--- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/PostMigrationTests.cs
+++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/PostMigrationTests.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Umbraco.
+// Copyright (c) Umbraco.
// See LICENSE for more details.
using System;
@@ -9,7 +9,6 @@ using Moq;
using NPoco;
using NUnit.Framework;
using Umbraco.Cms.Core.Configuration.Models;
-using Umbraco.Cms.Core.Migrations;
using Umbraco.Cms.Core.Scoping;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Infrastructure.Migrations;
@@ -36,9 +35,9 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
switch (t.Name)
{
case nameof(NoopMigration):
- return new NoopMigration();
+ return new NoopMigration(c);
case nameof(TestPostMigration):
- return new TestPostMigration();
+ return new TestPostMigration(c);
default:
throw new NotSupportedException();
}
@@ -84,11 +83,11 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
switch (t.Name)
{
case nameof(NoopMigration):
- return new NoopMigration();
+ return new NoopMigration(c);
case nameof(TestMigration):
return new TestMigration(c);
case nameof(TestPostMigration):
- return new TestPostMigration();
+ return new TestPostMigration(c);
default:
throw new NotSupportedException();
}
@@ -135,7 +134,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
public static int MigrateCount { get; set; }
- public override void Migrate()
+ protected override void Migrate()
{
MigrateCount++;
@@ -143,11 +142,15 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations
}
}
- public class TestPostMigration : IMigration
+ public class TestPostMigration : MigrationBase
{
+ public TestPostMigration(IMigrationContext context) : base(context)
+ {
+ }
+
public static int MigrateCount { get; set; }
- public void Migrate() => MigrateCount++;
+ protected override void Migrate() => MigrateCount++;
}
}
}
diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/AlterUserTableMigrationStub.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/AlterUserTableMigrationStub.cs
index 65dc493f43..370cd5b22c 100644
--- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/AlterUserTableMigrationStub.cs
+++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/AlterUserTableMigrationStub.cs
@@ -12,7 +12,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations.Stubs
{
}
- public override void Migrate()
+ protected override void Migrate()
{
Alter.Table("umbracoUser")
.AddColumn("Birthday")
diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/DropForeignKeyMigrationStub.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/DropForeignKeyMigrationStub.cs
index b363b0ffd0..6d50b15919 100644
--- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/DropForeignKeyMigrationStub.cs
+++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/DropForeignKeyMigrationStub.cs
@@ -12,7 +12,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations.Stubs
{
}
- public override void Migrate()
+ protected override void Migrate()
{
Delete.ForeignKey().FromTable("umbracoUser2app").ForeignColumn("user").ToTable("umbracoUser").PrimaryColumn("id").Do();
}
diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/Dummy.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/Dummy.cs
index 626fa4f3c6..a7212f0898 100644
--- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/Dummy.cs
+++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/Dummy.cs
@@ -1,7 +1,7 @@
-// Copyright (c) Umbraco.
+// Copyright (c) Umbraco.
// See LICENSE for more details.
-using Umbraco.Cms.Core.Migrations;
+using Umbraco.Cms.Infrastructure.Migrations;
namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations.Stubs
{
@@ -9,11 +9,12 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations.Stubs
/// This is just a dummy class that is used to ensure that implementations
/// of IMigration is not found if it doesn't have the MigrationAttribute (like this class).
///
- public class Dummy : IMigration
+ public class Dummy : MigrationBase
{
- public void Migrate()
+ public Dummy(IMigrationContext context) : base(context)
{
- throw new System.NotImplementedException();
}
+
+ protected override void Migrate() => throw new System.NotImplementedException();
}
}
diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/FiveZeroMigration.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/FiveZeroMigration.cs
index bb539d927b..df4ae36420 100644
--- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/FiveZeroMigration.cs
+++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/FiveZeroMigration.cs
@@ -12,7 +12,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations.Stubs
{
}
- public override void Migrate()
+ protected override void Migrate()
{
}
}
diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/FourElevenMigration.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/FourElevenMigration.cs
index 2eecf473cd..9a245704e3 100644
--- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/FourElevenMigration.cs
+++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/FourElevenMigration.cs
@@ -12,7 +12,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations.Stubs
{
}
- public override void Migrate()
+ protected override void Migrate()
{
Alter.Table("umbracoUser").AddColumn("companyPhone").AsString(255);
}
diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/SixZeroMigration1.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/SixZeroMigration1.cs
index fd3643bc7e..30b06190a7 100644
--- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/SixZeroMigration1.cs
+++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/SixZeroMigration1.cs
@@ -12,7 +12,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations.Stubs
{
}
- public override void Migrate()
+ protected override void Migrate()
{
Alter.Table("umbracoUser").AddColumn("secret").AsString(255);
}
diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/SixZeroMigration2.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/SixZeroMigration2.cs
index c254868892..bc494f8fed 100644
--- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/SixZeroMigration2.cs
+++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Migrations/Stubs/SixZeroMigration2.cs
@@ -12,7 +12,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Migrations.Stubs
{
}
- public override void Migrate()
+ protected override void Migrate()
{
Alter.Table("umbracoUser").AddColumn("secondEmail").AsString(255);
}