|
|
@ -1,4 +1,5 @@
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Ombi.Store.Context.Sqlite
|
|
|
|
namespace Ombi.Store.Context.Sqlite
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -10,8 +11,23 @@ namespace Ombi.Store.Context.Sqlite
|
|
|
|
if (_created) return;
|
|
|
|
if (_created) return;
|
|
|
|
|
|
|
|
|
|
|
|
_created = true;
|
|
|
|
_created = true;
|
|
|
|
|
|
|
|
Upgrade();
|
|
|
|
Database.SetCommandTimeout(60);
|
|
|
|
Database.SetCommandTimeout(60);
|
|
|
|
Database.Migrate();
|
|
|
|
Database.Migrate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Upgrade()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Database.ExecuteSqlCommand(@"INSERT INTO __EFMigrationsHistory (MigrationId,ProductVersion)
|
|
|
|
|
|
|
|
VALUES('20191103205133_Inital', '2.2.6-servicing-10079'); ");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// ignored
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|