diff --git a/src/Umbraco.Core/CoreBootManager.cs b/src/Umbraco.Core/CoreBootManager.cs index 3559a436a2..4a9ab5f182 100644 --- a/src/Umbraco.Core/CoreBootManager.cs +++ b/src/Umbraco.Core/CoreBootManager.cs @@ -135,29 +135,16 @@ namespace Umbraco.Core MacroPropertyTypeResolver.Current = new MacroPropertyTypeResolver( PluginManager.Current.ResolveMacroPropertyTypes()); + //the database migration objects + MigrationResolver.Current = new MigrationResolver( + PluginManager.Current.ResolveMigrationTypes()); + PropertyEditorValueConvertersResolver.Current = new PropertyEditorValueConvertersResolver( PluginManager.Current.ResolvePropertyEditorValueConverters()); //add the internal ones, these are not public currently so need to add them manually PropertyEditorValueConvertersResolver.Current.AddType(); PropertyEditorValueConvertersResolver.Current.AddType(); PropertyEditorValueConvertersResolver.Current.AddType(); - - //the database migration objects - MigrationResolver.Current = new MigrationResolver(new List - { - typeof (MigrationsVersionFourNineZero.RemoveUmbracoAppConstraints), - typeof (DeleteAppTables), - typeof (EnsureAppsTreesUpdated), - typeof (MoveMasterContentTypeData), - typeof (NewCmsContentType2ContentTypeTable), - typeof (RemoveMasterContentTypeColumn), - typeof (RenameCmsTabTable), - typeof (RenameTabIdColumn), - typeof (UpdateCmsContentTypeAllowedContentTypeTable), - typeof (UpdateCmsContentTypeTable), - typeof (UpdateCmsContentVersionTable), - typeof (UpdateCmsPropertyTypeGroupTable) - }); - } + } } } diff --git a/src/Umbraco.Core/Persistence/Migrations/MigrationResolver.cs b/src/Umbraco.Core/Persistence/Migrations/MigrationResolver.cs index b11107d7cb..2c9af738ff 100644 --- a/src/Umbraco.Core/Persistence/Migrations/MigrationResolver.cs +++ b/src/Umbraco.Core/Persistence/Migrations/MigrationResolver.cs @@ -12,12 +12,12 @@ namespace Umbraco.Core.Persistence.Migrations /// /// Constructor /// - /// + /// /// /// Use transient objects as we don't want these as singletons and take up memory that is not required /// - public MigrationResolver(IEnumerable surfaceControllers) - : base(surfaceControllers, ObjectLifetimeScope.Transient) + public MigrationResolver(IEnumerable migrations) + : base(migrations, ObjectLifetimeScope.Transient) { } diff --git a/src/Umbraco.Core/PluginManager.cs b/src/Umbraco.Core/PluginManager.cs index 42ca5fc1f5..4f1f18c2ab 100644 --- a/src/Umbraco.Core/PluginManager.cs +++ b/src/Umbraco.Core/PluginManager.cs @@ -11,6 +11,7 @@ using System.Xml.Linq; using Umbraco.Core.IO; using Umbraco.Core.Logging; using Umbraco.Core.Models; +using Umbraco.Core.Persistence.Migrations; using Umbraco.Core.PropertyEditors; using umbraco.interfaces; using File = System.IO.File; @@ -458,6 +459,15 @@ namespace Umbraco.Core return ResolveTypes(); } + /// + /// Returns all available IMigrations in application + /// + /// + internal IEnumerable ResolveMigrationTypes() + { + return ResolveTypes(); + } + /// /// Gets/sets which assemblies to scan when type finding, generally used for unit testing, if not explicitly set /// this will search all assemblies known to have plugins and exclude ones known to not have them.