Browse Source

DbMigrator app should migrate the payment db too.

pull/74/head
Halil İbrahim Kalkan 5 years ago
parent
commit
1a3f882fe1
  1. 6
      src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreEventHubDbSchemaMigrator.cs

6
src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreEventHubDbSchemaMigrator.cs

@ -3,6 +3,7 @@ using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using EventHub.Data; using EventHub.Data;
using EventHub.EntityFrameworkCore.Payment;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
namespace EventHub.EntityFrameworkCore namespace EventHub.EntityFrameworkCore
@ -30,6 +31,11 @@ namespace EventHub.EntityFrameworkCore
.GetRequiredService<EventHubDbContext>() .GetRequiredService<EventHubDbContext>()
.Database .Database
.MigrateAsync(); .MigrateAsync();
await _serviceProvider
.GetRequiredService<EventHubPaymentDbContext>()
.Database
.MigrateAsync();
} }
} }
} }
Loading…
Cancel
Save