mirror of
https://github.com/Sonarr/Sonarr
synced 2025-02-24 23:13:10 +00:00
Disable pooling rather than clearing it
This commit is contained in:
parent
07f5c21a07
commit
556bd11725
1 changed files with 4 additions and 3 deletions
|
@ -39,12 +39,13 @@ namespace NzbDrone.Core.Datastore.Migration
|
||||||
// Early Radarr versions can mess up Sonarr's database if they point to the same config. Fixup the damage.
|
// Early Radarr versions can mess up Sonarr's database if they point to the same config. Fixup the damage.
|
||||||
private void FixupMigration111()
|
private void FixupMigration111()
|
||||||
{
|
{
|
||||||
|
var builder = new SQLiteConnectionStringBuilder(ConnectionString);
|
||||||
|
builder.Pooling = false;
|
||||||
|
|
||||||
// In order to get the expressions we need to check the database directly
|
// In order to get the expressions we need to check the database directly
|
||||||
using (var connection = new SQLiteConnection(ConnectionString))
|
using (var connection = new SQLiteConnection(builder.ToString()))
|
||||||
using (var command = connection.CreateCommand())
|
using (var command = connection.CreateCommand())
|
||||||
{
|
{
|
||||||
SQLiteConnection.ClearPool(connection);
|
|
||||||
|
|
||||||
connection.Open();
|
connection.Open();
|
||||||
command.CommandText = "SELECT Description FROM VersionInfo WHERE Version = 111";
|
command.CommandText = "SELECT Description FROM VersionInfo WHERE Version = 111";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue