mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-28 04:51:45 +02:00
more dynamic binding to sqlce
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using NLog;
|
||||
|
||||
@@ -27,7 +28,9 @@ namespace NzbDrone.Core.Datastore
|
||||
{
|
||||
migrator = new Migrator.Migrator("sqlserverce", connectionString, Assembly.GetAssembly(typeof(MigrationsHelper)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
migrator.MigrateToLastVersion();
|
||||
logger.Info("Database migration completed");
|
||||
|
||||
@@ -42,10 +45,7 @@ namespace NzbDrone.Core.Datastore
|
||||
|
||||
private static void EnsureDatabase(string constr)
|
||||
{
|
||||
var proxyType = Assembly.Load("NzbDrone.SqlCe").GetExportedTypes()[0];
|
||||
var instance = Activator.CreateInstance(proxyType);
|
||||
var factoryMethod = proxyType.GetMethod("EnsureDatabase");
|
||||
factoryMethod.Invoke(instance, new object[] { constr });
|
||||
|
||||
}
|
||||
|
||||
public static string GetIndexName(string tableName, params string[] columns)
|
||||
|
Reference in New Issue
Block a user