Browse Source

enable write-ahead logging on all sqlite databases (#2162)

pull/2163/head
Jason Dove 1 year ago committed by GitHub
parent
commit
cf6b9cf29a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 3
      ErsatzTV.Infrastructure/Data/DbInitializer.cs

1
CHANGELOG.md

@ -109,6 +109,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -109,6 +109,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Expand special zero-count case for `Multiple` playout mode with playlists
- This configuration will automatically maintain the multiple count so that it is equal to the number of items in each playlist item
- This configuration should be used if you want to play every media item in a playlist item exactly once before advancing
- Enable write-ahead logging (WAL) mode on SQLite databases
### Fixed
- Fix QSV acceleration in docker with older Intel devices

3
ErsatzTV.Infrastructure/Data/DbInitializer.cs

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
using System.Globalization;
using System.Reflection;
using Dapper;
using ErsatzTV.Core.Domain;
namespace ErsatzTV.Infrastructure.Data;
@ -8,6 +9,8 @@ public static class DbInitializer @@ -8,6 +9,8 @@ public static class DbInitializer
{
public static async Task<Unit> Initialize(TvContext context, CancellationToken cancellationToken)
{
await context.Connection.ExecuteAsync("PRAGMA journal_mode=WAL", cancellationToken);
if (!context.LanguageCodes.Any())
{
var assembly = Assembly.GetEntryAssembly();

Loading…
Cancel
Save