mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Fixing database creation
This commit is contained in:
parent
41cabdd1b5
commit
c084208013
@ -28,11 +28,6 @@ namespace Kyoo.Tasks
|
|||||||
IdentityDatabase identityDatabase = serviceScope.ServiceProvider.GetService<IdentityDatabase>();
|
IdentityDatabase identityDatabase = serviceScope.ServiceProvider.GetService<IdentityDatabase>();
|
||||||
ConfigurationDbContext identityContext = serviceScope.ServiceProvider.GetService<ConfigurationDbContext>();
|
ConfigurationDbContext identityContext = serviceScope.ServiceProvider.GetService<ConfigurationDbContext>();
|
||||||
|
|
||||||
if (!databaseContext.Database.CanConnect()
|
|
||||||
|| !identityDatabase.Database.CanConnect()
|
|
||||||
|| !identityContext.Database.CanConnect())
|
|
||||||
throw new SystemException("Coudln't connect to the database.");
|
|
||||||
|
|
||||||
databaseContext.Database.Migrate();
|
databaseContext.Database.Migrate();
|
||||||
identityDatabase.Database.Migrate();
|
identityDatabase.Database.Migrate();
|
||||||
identityContext.Database.Migrate();
|
identityContext.Database.Migrate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user