Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use AddDataMigration() #12434

Merged
merged 1 commit into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public override void ConfigureServices(IServiceCollection services)

services.AddScoped<IContentDisplayDriver, DashboardContentDisplayDriver>();

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
}

public override void Configure(IApplicationBuilder builder, IEndpointRouteBuilder routes, IServiceProvider serviceProvider)
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Alias/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddScoped<IScopedIndexProvider>(sp => sp.GetRequiredService<AliasPartIndexProvider>());
services.AddScoped<IContentHandler>(sp => sp.GetRequiredService<AliasPartIndexProvider>());

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<IContentHandleProvider, AliasPartContentHandleProvider>();

// Identity Part
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override void ConfigureServices(IServiceCollection services)
.AddContentPart<ArchiveLaterPart>()
.UseDisplayDriver<ArchiveLaterPartDisplayDriver>();

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();

services.AddScoped<ArchiveLaterPartIndexProvider>();
services.AddScoped<IScopedIndexProvider>(sp => sp.GetRequiredService<ArchiveLaterPartIndexProvider>());
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.AuditTrail/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public override void ConfigureServices(IServiceCollection services)

services.Configure<StoreCollectionOptions>(o => o.Collections.Add(AuditTrailEvent.Collection));

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddSingleton<IIndexProvider, AuditTrailEventIndexProvider>();
services.AddSingleton<IBackgroundTask, AuditTrailBackgroundTask>();

Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Autoroute/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddScoped<IScopedIndexProvider>(sp => sp.GetRequiredService<AutoroutePartIndexProvider>());
services.AddScoped<IContentHandler>(sp => sp.GetRequiredService<AutoroutePartIndexProvider>());

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddSingleton<IAutorouteEntries, AutorouteEntries>();
services.AddScoped<IContentHandleProvider, AutorouteHandleProvider>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddScoped<IContentPickerResultProvider, DefaultContentPickerResultProvider>();

// Migration, can be removed in a future release.
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
}

public override void Configure(IApplicationBuilder builder, IEndpointRouteBuilder routes, IServiceProvider serviceProvider)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static IServiceCollection AddContentLocalization(this IServiceCollection
services.AddScoped<IScopedIndexProvider>(sp => sp.GetRequiredService<LocalizedContentItemIndexProvider>());
services.AddScoped<IContentHandler>(sp => sp.GetRequiredService<LocalizedContentItemIndexProvider>());

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<IContentLocalizationHandler, ContentLocalizationPartHandlerCoordinator>();

return services;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddContentPart<PreviewPart>()
.AddHandler<PreviewPartHandler>();

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<IContentTypePartDefinitionDisplayDriver, PreviewPartSettingsDisplayDriver>();
services.TryAddEnumerable(ServiceDescriptor.Singleton<IStartupFilter, PreviewStartupFilter>());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public Startup(IOptions<AdminOptions> adminOptions)

public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddContentPart<AuditTrailPart>()
.UseDisplayDriver<AuditTrailPartDisplayDriver>();

Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Contents/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ async Task<FluidValue> GetContentByHandleAsync(LiquidTemplateContext context, st
services.AddScoped<IContentHandleProvider, ContentItemIdHandleProvider>();
services.AddScoped<IContentItemIndexHandler, ContentItemIndexCoordinator>();

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();

// Common Part
services.AddContentPart<CommonPart>()
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Demo/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddShapeAttributes<DemoShapeProvider>();
services.AddScoped<INavigationProvider, AdminMenu>();
services.AddScoped<IContentDisplayDriver, TestContentElementDisplayDriver>();
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<IPermissionProvider, Permissions>();
services.AddContentPart<TestContentPartA>();
services.AddScoped<IUserClaimsProvider, UserProfileClaimsProvider>();
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Flows/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public override void ConfigureServices(IServiceCollection services)

services.AddContentPart<FlowMetadata>();

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
}

public override void Configure(IApplicationBuilder app, IEndpointRouteBuilder routes, IServiceProvider serviceProvider)
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Forms/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddContentPart<FormElementValidationPart>()
.UseDisplayDriver<FormElementValidationPartDisplayDriver>();

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
}
}
}
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Html/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddScoped<IContentTypePartDefinitionDisplayDriver, HtmlBodyPartSettingsDisplayDriver>();
services.AddScoped<IContentTypePartDefinitionDisplayDriver, HtmlBodyPartTrumbowygEditorSettingsDriver>();
services.AddScoped<IContentTypePartDefinitionDisplayDriver, HtmlBodyPartMonacoEditorSettingsDriver>();
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<IContentPartIndexHandler, HtmlBodyPartIndexHandler>();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Indexing/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IIndexingTaskManager, IndexingTaskManager>();
services.AddScoped<IContentHandler, CreateIndexingTaskContentHandler>();
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
}
}
}
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Layers/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddScoped<ILayerService, LayerService>();
services.AddScoped<IContentHandler, LayerMetadataHandler>();
services.AddSingleton<IIndexProvider, LayerMetadataIndexProvider>();
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<IPermissionProvider, Permissions>();
services.AddRecipeExecutionStep<LayerStep>();

Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Liquid/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public override void ConfigureServices(IServiceCollection services)
.UseDisplayDriver<LiquidPartDisplayDriver>()
.AddHandler<LiquidPartHandler>();

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<IContentPartIndexHandler, LiquidPartIndexHandler>();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Lists/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public override void ConfigureServices(IServiceCollection services)
.AddHandler<ListPartHandler>();

services.AddScoped<IContentTypePartDefinitionDisplayDriver, ListPartSettingsDisplayDriver>();
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<IContentItemIndexHandler, ContainedPartContentIndexHandler>();
services.AddScoped<IContainerService, ContainerService>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Markdown/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public override void ConfigureServices(IServiceCollection services)
.AddHandler<MarkdownBodyPartHandler>();

services.AddScoped<IContentTypePartDefinitionDisplayDriver, MarkdownBodyPartSettingsDisplayDriver>();
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<IContentPartIndexHandler, MarkdownBodyPartIndexHandler>();

// Markdown Field
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Media/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddScoped<AttachedMediaFieldFileService, AttachedMediaFieldFileService>();
services.AddScoped<IContentHandler, AttachedMediaFieldContentHandler>();
services.AddScoped<IModularTenantEvents, TempDirCleanerService>();
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<IContentFieldIndexHandler, MediaFieldIndexHandler>();
services.AddMediaFileTextProvider<PdfMediaFileTextProvider>(".pdf");

Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Menu/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public Startup(IOptions<AdminOptions> adminOptions)

public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<IShapeTableProvider, MenuShapes>();
services.AddScoped<IPermissionProvider, Permissions>();
services.AddScoped<INavigationProvider, AdminMenu>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public override void ConfigureServices(IServiceCollection services)
.UseDisplayDriver<PublishLaterPartDisplayDriver>()
.AddHandler<PublishLaterPartHandler>();

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();

services.AddScoped<PublishLaterPartIndexProvider>();
services.AddScoped<IScopedIndexProvider>(sp => sp.GetRequiredService<PublishLaterPartIndexProvider>());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddContentPart<ReCaptchaPart>()
.UseDisplayDriver<ReCaptchaPartDisplayDriver>();

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
}
}
}
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Seo/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();

services.AddContentPart<SeoMetaPart>()
.UseDisplayDriver<SeoMetaPartDisplayDriver>()
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Sitemaps/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public Startup(IOptions<AdminOptions> adminOptions)

public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<INavigationProvider, AdminMenu>();
services.AddScoped<IPermissionProvider, Permissions>();

Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Taxonomies/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public override void ConfigureServices(IServiceCollection services)
.AddLiquidFilter<InheritedTermsFilter>("inherited_terms")
.AddLiquidFilter<TaxonomyTermsFilter>("taxonomy_terms");

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<IShapeTableProvider, TermShapes>();
services.AddScoped<IPermissionProvider, Permissions>();

Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Title/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddScoped<IContentPartIndexHandler, TitlePartIndexHandler>();
services.AddScoped<IContentTypePartDefinitionDisplayDriver, TitlePartSettingsDisplayDriver>();

services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
}
}
}
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Users/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddSingleton<IIndexProvider, UserByRoleNameIndexProvider>();
services.AddSingleton<IIndexProvider, UserByLoginInfoIndexProvider>();
services.AddSingleton<IIndexProvider, UserByClaimIndexProvider>();
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();

services.AddScoped<IUserService, UserService>();
services.AddScoped<IUserClaimsPrincipalFactory<IUser>, DefaultUserClaimsPrincipalProviderFactory>();
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Widgets/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public override void ConfigureServices(IServiceCollection services)

services.AddScoped<IContentTypePartDefinitionDisplayDriver, WidgetsListPartSettingsDisplayDriver>();
services.AddContentPart<WidgetMetadata>();
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
}

public override void Configure(IApplicationBuilder app, IEndpointRouteBuilder routes, IServiceProvider serviceProvider)
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Workflows/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public override void ConfigureServices(IServiceCollection services)
services.AddScoped<IWorkflowStore, WorkflowStore>();
services.AddScoped<IWorkflowManager, WorkflowManager>();
services.AddScoped<IActivityDisplayManager, ActivityDisplayManager>();
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<INavigationProvider, AdminMenu>();
services.AddScoped<IPermissionProvider, Permissions>();
services.AddScoped<IDisplayDriver<IActivity>, MissingActivityDisplayDriver>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static IServiceCollection AddContentManagement(this IServiceCollection se
services.TryAddScoped<IContentManager, DefaultContentManager>();
services.TryAddScoped<IContentManagerSession, DefaultContentManagerSession>();
services.AddSingleton<IIndexProvider, ContentItemIndexProvider>();
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
services.AddScoped<IContentHandler, UpdateContentsHandler>();
services.AddScoped<IContentHandler, ContentPartHandlerCoordinator>();
services.AddSingleton<ITypeActivatorFactory<ContentPart>, ContentPartFactory>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public override void ConfigureServices(IServiceCollection services)
.AddHandler<MyTestPartHandler>();

services.AddScoped<IContentTypePartDefinitionDisplayDriver, MyTestPartSettingsDisplayDriver>();
services.AddScoped<IDataMigration, Migrations>();
services.AddDataMigration<Migrations>();
#endif
}

Expand Down