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

NEST-401: Upgrade to Orchard Core pre-1.6 nightly #52

Merged
merged 2 commits into from
Feb 22, 2023
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
17 changes: 17 additions & 0 deletions Lombiq.Privacy/Extensions/MigrationServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Data.Migration;

namespace Lombiq.Privacy.Extensions;

// We need to use this until the Orchard Core upgrade so we don't have to upgrade submodules to nightly versions. This
// is the same method as what is in the 1.6 nightly version of Orchard Core. During the upgrade, this can be removed and
// use the Orchard Core method for data migrations.

/// <summary>
/// Provides extension methods for <see cref="IServiceCollection"/> to add YesSql migration <see cref="IDataMigration"/>.
/// </summary>
public static class MigrationServiceCollectionExtensions
{
public static IServiceCollection AddDataMigration<TDataMigration>(this IServiceCollection services)
where TDataMigration : class, IDataMigration => services.AddScoped<IDataMigration, TDataMigration>();
}
2 changes: 1 addition & 1 deletion Lombiq.Privacy/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Lombiq.Privacy.Activities;
using Lombiq.Privacy.Constants;
using Lombiq.Privacy.Drivers;
using Lombiq.Privacy.Extensions;
using Lombiq.Privacy.Filters;
using Lombiq.Privacy.Handlers;
using Lombiq.Privacy.Migrations;
Expand All @@ -15,7 +16,6 @@
using Microsoft.Extensions.Options;
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement.Display.ContentDisplay;
using OrchardCore.Data.Migration;
using OrchardCore.Modules;
using OrchardCore.Navigation;
using OrchardCore.ResourceManagement;
Expand Down