Changes the CoreBootManager to resolve migrations through the use of the PluginManager instead of having the migration types hardcoded.

This commit is contained in:
Morten Christensen
2013-01-18 12:05:00 -01:00
parent 62bd1ce4fa
commit f6ceb937a1
3 changed files with 18 additions and 21 deletions

View File

@@ -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<DatePickerPropertyEditorValueConverter>();
PropertyEditorValueConvertersResolver.Current.AddType<TinyMcePropertyEditorValueConverter>();
PropertyEditorValueConvertersResolver.Current.AddType<YesNoPropertyEditorValueConverter>();
//the database migration objects
MigrationResolver.Current = new MigrationResolver(new List<Type>
{
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)
});
}
}
}
}