1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-30 11:46:09 +00:00

Fixed: Migration issue when column names were wrapped in backticks instead of quotes

This commit is contained in:
Mark McDowall 2014-08-25 11:12:26 -07:00
parent 388e71108b
commit 15ebe03130

View file

@ -26,7 +26,7 @@ namespace NzbDrone.Core.Datastore.Migration.Framework
{ {
private readonly SQLiteConnection _connection; private readonly SQLiteConnection _connection;
private static readonly Regex SchemaRegex = new Regex(@"['\""\[](?<name>\w+)['\""\]]\s(?<schema>[\w-\s]+)", private static readonly Regex SchemaRegex = new Regex(@"[`'\""\[](?<name>\w+)[`'\""\]]\s(?<schema>[\w-\s]+)",
RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline); RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline);
private static readonly Regex IndexRegex = new Regex(@"\((?:""|')(?<col>.*)(?:""|')\s(?<direction>ASC|DESC)\)$", private static readonly Regex IndexRegex = new Regex(@"\((?:""|')(?<col>.*)(?:""|')\s(?<direction>ASC|DESC)\)$",