mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-08 14:57:54 +00:00
chore: remove legacy C# DatabaseMigrator
This commit is contained in:
parent
c174a5bd80
commit
f12ef84e55
4 changed files with 1 additions and 92 deletions
|
|
@ -23,18 +23,16 @@ internal partial class Database: IDatabase
|
|||
private readonly ILogger _logger;
|
||||
private readonly IMetrics _metrics;
|
||||
private readonly DbConnectionCountHolder _countHolder;
|
||||
private readonly DatabaseMigrator _migrator;
|
||||
|
||||
private readonly NpgsqlDataSource _dataSource;
|
||||
private readonly NpgsqlDataSource _dataSourceMessages;
|
||||
|
||||
public Database(CoreConfig config, DbConnectionCountHolder countHolder, ILogger logger,
|
||||
IMetrics metrics, DatabaseMigrator migrator)
|
||||
IMetrics metrics)
|
||||
{
|
||||
_config = config;
|
||||
_countHolder = countHolder;
|
||||
_metrics = metrics;
|
||||
_migrator = migrator;
|
||||
_logger = logger.ForContext<Database>();
|
||||
|
||||
string connectionString(string src)
|
||||
|
|
@ -121,12 +119,6 @@ internal partial class Database: IDatabase
|
|||
return conn;
|
||||
}
|
||||
|
||||
public async Task ApplyMigrations()
|
||||
{
|
||||
using var conn = await Obtain();
|
||||
await _migrator.ApplyMigrations(conn);
|
||||
}
|
||||
|
||||
private class PassthroughTypeHandler<T>: SqlMapper.TypeHandler<T>
|
||||
{
|
||||
public override void SetValue(IDbDataParameter parameter, T value) => parameter.Value = value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue