mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
create data folder if doesn't exist.
This commit is contained in:
parent
0d6d9a7021
commit
6d3a604677
2 changed files with 24 additions and 12 deletions
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Data.SQLite;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using NLog;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration.Framework
|
||||
{
|
||||
|
@ -24,10 +25,19 @@ namespace NzbDrone.Core.Datastore.Migration.Framework
|
|||
private static readonly Regex SchemaRegex = new Regex(@"['\""\[](?<name>\w+)['\""\]]\s(?<schema>[\w-\s]+)",
|
||||
RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline);
|
||||
|
||||
public SQLiteMigrationHelper(IConnectionStringFactory connectionStringFactory)
|
||||
public SQLiteMigrationHelper(IConnectionStringFactory connectionStringFactory,Logger logger)
|
||||
{
|
||||
_connection = new SQLiteConnection(connectionStringFactory.MainDbConnectionString);
|
||||
_connection.Open();
|
||||
try
|
||||
{
|
||||
_connection = new SQLiteConnection(connectionStringFactory.MainDbConnectionString);
|
||||
_connection.Open();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.ErrorException("Couldn't open databse " + connectionStringFactory.MainDbConnectionString, e);
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private string GetOriginalSql(string tableName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue