From 6c8a738e02659bd938460f14e0cafbc50a2d7c31 Mon Sep 17 00:00:00 2001 From: croire <1432593898@qq.com> Date: Sat, 12 Mar 2022 01:25:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9D=A1=E4=BB=B6=E7=BC=96?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DownKyi.Core/Storage/Database/CoverDb.cs | 7 ++++++- DownKyi.Core/Storage/Database/HeaderDb.cs | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/DownKyi.Core/Storage/Database/CoverDb.cs b/DownKyi.Core/Storage/Database/CoverDb.cs index 1c5ecfa..9576116 100644 --- a/DownKyi.Core/Storage/Database/CoverDb.cs +++ b/DownKyi.Core/Storage/Database/CoverDb.cs @@ -7,9 +7,14 @@ namespace DownKyi.Core.Storage.Database public class CoverDb { private const string key = "b5018ecc-09d1-4da2-aa49-4625e41e623e"; - private readonly DbHelper dbHelper = new DbHelper(StorageManager.GetCoverIndex(), key); private readonly string tableName = "cover"; +#if DEBUG + private readonly DbHelper dbHelper = new DbHelper(StorageManager.GetCoverIndex().Replace(".db", "_debug.db")); +#else + private readonly DbHelper dbHelper = new DbHelper(StorageManager.GetCoverIndex(), key); +#endif + public CoverDb() { CreateTable(); diff --git a/DownKyi.Core/Storage/Database/HeaderDb.cs b/DownKyi.Core/Storage/Database/HeaderDb.cs index 325e4a2..28f9a48 100644 --- a/DownKyi.Core/Storage/Database/HeaderDb.cs +++ b/DownKyi.Core/Storage/Database/HeaderDb.cs @@ -7,9 +7,14 @@ namespace DownKyi.Core.Storage.Database public class HeaderDb { private const string key = "7c1f1f40-7cdf-4d11-ad28-f0137a3c5308"; - private readonly DbHelper dbHelper = new DbHelper(StorageManager.GetHeaderIndex(), key); private readonly string tableName = "header"; +#if DEBUG + private readonly DbHelper dbHelper = new DbHelper(StorageManager.GetHeaderIndex().Replace(".db", "_debug.db")); +#else + private readonly DbHelper dbHelper = new DbHelper(StorageManager.GetHeaderIndex(), key); +#endif + public HeaderDb() { CreateTable();