Skip to content

Commit

Permalink
Merge pull request #6347 from capadong/develop
Browse files Browse the repository at this point in the history
#5096 Skipped running no dependency migrations before DB created
  • Loading branch information
exileDev committed Sep 5, 2022
2 parents 3d656ca + 47c0f0d commit 85f1c0d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Libraries/Nop.Data/NopDbStartup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public void ConfigureServices(IServiceCollection services, IConfiguration config
//repositories
services.AddScoped(typeof(IRepository<>), typeof(EntityRepository<>));

if (!DataSettingsManager.IsDatabaseInstalled())
return;

using var scope = services.BuildServiceProvider().CreateScope();
var runner = scope.ServiceProvider.GetRequiredService<IMigrationManager>();
foreach (var assembly in mAssemblies)
Expand All @@ -76,4 +79,4 @@ public void Configure(IApplicationBuilder application)
/// </summary>
public int Order => 10;
}
}
}

0 comments on commit 85f1c0d

Please sign in to comment.