mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-17 10:45:49 +02:00
building connection string using SQLiteConnectionStringBuilder
This commit is contained in:
parent
e03e2c46d6
commit
a37ccf1d94
@ -50,7 +50,13 @@ public IDatabase Create(string dbPath, MigrationType migrationType = MigrationTy
|
||||
|
||||
private string GetConnectionString(string dbPath)
|
||||
{
|
||||
return String.Format("Data Source={0};Version=3;", dbPath);
|
||||
var connectionBuilder = new SQLiteConnectionStringBuilder();
|
||||
|
||||
connectionBuilder.DataSource = dbPath;
|
||||
connectionBuilder.CacheSize = (int)-10.Megabytes();
|
||||
connectionBuilder.DateTimeKind = DateTimeKind.Utc;
|
||||
|
||||
return connectionBuilder.ConnectionString;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user