Fixed the issue with the Identity Server running on a different port, we can now use -url #865

This commit is contained in:
Jamie.Rees 2017-07-28 14:19:20 +01:00
parent 9d435ccc0f
commit c196dce843
22 changed files with 499 additions and 2566 deletions

View file

@ -21,6 +21,7 @@ namespace Ombi.Store.Context
EntityEntry<TEntity> Attach<TEntity>(TEntity entity) where TEntity : class;
DbSet<TEntity> Set<TEntity>() where TEntity : class;
DbSet<NotificationTemplates> NotificationTemplates { get; set; }
DbSet<ApplicationConfiguration> ApplicationConfigurations { get; set; }
void Seed();
DbSet<MovieRequests> MovieRequests { get; set; }

View file

@ -34,6 +34,8 @@ namespace Ombi.Store.Context
public DbSet<MovieIssues> MovieIssues { get; set; }
public DbSet<TvIssues> TvIssues { get; set; }
public DbSet<ApplicationConfiguration> ApplicationConfigurations { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlite("Data Source=Ombi.db");

View file

@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Ombi.Store.Entities
{
[Table("ApplicationConfiguration")]
public class ApplicationConfiguration : Entity
{
public ConfigurationTypes Type { get; set; }
public string Value { get; set; }
}
public enum ConfigurationTypes
{
Url,
}
}

View file

@ -4,14 +4,14 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Ombi.Store.Context;
using Ombi.Helpers;
using Ombi.Store.Entities;
using Ombi.Helpers;
namespace Ombi.Store.Migrations
{
[DbContext(typeof(OmbiContext))]
[Migration("20170719072204_Initial")]
partial class Initial
[Migration("20170728131851_Inital")]
partial class Inital
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
@ -125,6 +125,20 @@ namespace Ombi.Store.Migrations
b.ToTable("AspNetUserTokens");
});
modelBuilder.Entity("Ombi.Store.Entities.ApplicationConfiguration", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("Type");
b.Property<string>("Value");
b.HasKey("Id");
b.ToTable("ApplicationConfiguration");
});
modelBuilder.Entity("Ombi.Store.Entities.GlobalSettings", b =>
{
b.Property<int>("Id")

View file

@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
namespace Ombi.Store.Migrations
{
public partial class Initial : Migration
public partial class Inital : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
@ -36,6 +36,20 @@ namespace Ombi.Store.Migrations
table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
});
migrationBuilder.CreateTable(
name: "ApplicationConfiguration",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Type = table.Column<int>(nullable: false),
Value = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ApplicationConfiguration", x => x.Id);
});
migrationBuilder.CreateTable(
name: "GlobalSettings",
columns: table => new
@ -528,6 +542,9 @@ namespace Ombi.Store.Migrations
migrationBuilder.DropTable(
name: "AspNetUserTokens");
migrationBuilder.DropTable(
name: "ApplicationConfiguration");
migrationBuilder.DropTable(
name: "GlobalSettings");

View file

@ -4,8 +4,8 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Ombi.Store.Context;
using Ombi.Helpers;
using Ombi.Store.Entities;
using Ombi.Helpers;
namespace Ombi.Store.Migrations
{
@ -124,6 +124,20 @@ namespace Ombi.Store.Migrations
b.ToTable("AspNetUserTokens");
});
modelBuilder.Entity("Ombi.Store.Entities.ApplicationConfiguration", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("Type");
b.Property<string>("Value");
b.HasKey("Id");
b.ToTable("ApplicationConfiguration");
});
modelBuilder.Entity("Ombi.Store.Entities.GlobalSettings", b =>
{
b.Property<int>("Id")

View file

@ -1 +1 @@
dotnet ef migrations add MIGRATIONNAME --context OmbiContext --startup-project ../Ombi/Ombi.csproj
dotnet ef migrations add Inital --context OmbiContext --startup-project ../Ombi/Ombi.csproj