mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 17:22:54 -07:00
#1513 Added storage path
This commit is contained in:
parent
e735df5d0a
commit
d9ab803a11
5 changed files with 48 additions and 13 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
@ -14,12 +15,10 @@ namespace Ombi.Store.Context
|
|||
public OmbiContext()
|
||||
{
|
||||
if (_created) return;
|
||||
|
||||
|
||||
_created = true;
|
||||
Database.Migrate();
|
||||
|
||||
// Add the notifcation templates
|
||||
|
||||
}
|
||||
|
||||
public DbSet<NotificationTemplates> NotificationTemplates { get; set; }
|
||||
|
@ -44,7 +43,8 @@ namespace Ombi.Store.Context
|
|||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
optionsBuilder.UseSqlite("Data Source=Ombi.db");
|
||||
var i = StoragePathSingleton.Instance;
|
||||
optionsBuilder.UseSqlite($"Data Source={Path.Combine(i.StoragePath,"Ombi.db")}");
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue