You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi.Store/Context/Sqlite/ExternalSqliteContext.cs

33 lines
861 B

using System;
using Microsoft.EntityFrameworkCore;
5 years ago
namespace Ombi.Store.Context.Sqlite
{
5 years ago
public sealed class ExternalSqliteContext : ExternalContext
{
private static bool _created;
5 years ago
public ExternalSqliteContext(DbContextOptions<ExternalSqliteContext> options) : base(options)
{
if (_created) return;
_created = true;
Upgrade();
Database.SetCommandTimeout(60);
Database.Migrate();
}
private void Upgrade()
{
try
{
Database.ExecuteSqlCommand(@"INSERT INTO __EFMigrationsHistory (MigrationId,ProductVersion)
VALUES('20191103205133_Inital', '2.2.6-servicing-10079'); ");
}
catch (Exception)
{
// ignored
}
}
}
}