feat: add assembly for migration
This commit is contained in:
@ -76,9 +76,12 @@ public static class DependencyInjection
|
||||
{
|
||||
return dbProvider switch
|
||||
{
|
||||
DatabaseProvider.Sqlite => options.UseSqlite(connection),
|
||||
DatabaseProvider.Mysql => options.UseMySql(connection, ServerVersion.AutoDetect(connection)),
|
||||
DatabaseProvider.Postgresql => options.UseNpgsql(connection),
|
||||
DatabaseProvider.Mysql => options.UseMySql(connection, ServerVersion.AutoDetect(connection),
|
||||
x => x.MigrationsAssembly("MysqlMigrations")),
|
||||
DatabaseProvider.Sqlite => options.UseSqlite(connection,
|
||||
x => x.MigrationsAssembly("SqliteMigrations")),
|
||||
DatabaseProvider.Postgresql => options.UseNpgsql(connection,
|
||||
x => x.MigrationsAssembly("PsqlMigrations")),
|
||||
_ => throw new ArgumentException("Unsupported database provider", Enum.GetName(dbProvider))
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user