mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-06 21:21:13 -07:00
feat: Adding postgres support to ombi (beta) (#5050)
This commit is contained in:
parent
8ff7d9995d
commit
f8c61027bf
22 changed files with 5660 additions and 12 deletions
22
src/Ombi.Store/Context/Postgres/OmbiPostgresContext.cs
Normal file
22
src/Ombi.Store/Context/Postgres/OmbiPostgresContext.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Ombi.Store.Context.Postgres
|
||||
{
|
||||
public sealed class OmbiPostgresContext : OmbiContext
|
||||
{
|
||||
private static bool _created;
|
||||
|
||||
public OmbiPostgresContext(DbContextOptions<OmbiPostgresContext> options) : base(options)
|
||||
{
|
||||
if (_created) return;
|
||||
_created = true;
|
||||
|
||||
Database.Migrate();
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue