Fixing postgres migrations

This commit is contained in:
Zoe Roux
2021-05-05 20:49:52 +02:00
parent feb643da2e
commit b2151a0dde
13 changed files with 2287 additions and 38 deletions
+7
View File
@@ -71,5 +71,12 @@ namespace Kyoo.Postgresql
// _environment.IsDevelopment()));
// services.AddScoped<DbContext>(x => x.GetRequiredService<PostgresContext>());
}
/// <inheritdoc />
public void Initialize(IServiceProvider provider)
{
DatabaseContext context = provider.GetRequiredService<DatabaseContext>();
context.Database.Migrate();
}
}
}