1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-23 08:13:01 +00:00

Merge pull request #167 from Sonarr/sqlite-journal-osx

fixed: changed Journaling for osx to prevent db corruption
This commit is contained in:
Keivan Beigi 2015-01-15 10:53:12 -08:00
commit d478e6d932

View file

@ -29,7 +29,7 @@ private static string GetConnectionString(string dbPath)
connectionBuilder.DataSource = dbPath;
connectionBuilder.CacheSize = (int)-10.Megabytes();
connectionBuilder.DateTimeKind = DateTimeKind.Utc;
connectionBuilder.JournalMode = SQLiteJournalModeEnum.Wal;
connectionBuilder.JournalMode = OsInfo.IsOsx ? SQLiteJournalModeEnum.Truncate : SQLiteJournalModeEnum.Wal;
connectionBuilder.Pooling = true;
return connectionBuilder.ConnectionString;