partial revert + change
This commit is contained in:
@@ -1,16 +1,12 @@
|
||||
using MareSynchronosShared.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace MareSynchronosShared.Data;
|
||||
|
||||
public class MareDbContext : DbContext
|
||||
{
|
||||
#if DEBUG
|
||||
public MareDbContext() { }
|
||||
public MareDbContext(DbContextOptions<MareDbContext> options) : base(options)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
@@ -29,6 +25,11 @@ public class MareDbContext : DbContext
|
||||
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
#endif
|
||||
|
||||
public MareDbContext(DbContextOptions<MareDbContext> options) : base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public DbSet<User> Users { get; set; }
|
||||
public DbSet<FileCache> Files { get; set; }
|
||||
@@ -38,7 +39,6 @@ public class MareDbContext : DbContext
|
||||
public DbSet<Auth> Auth { get; set; }
|
||||
public DbSet<LodeStoneAuth> LodeStoneAuth { get; set; }
|
||||
public DbSet<BannedRegistrations> BannedRegistrations { get; set; }
|
||||
public DbSet<Alias> Aliases { get; set; }
|
||||
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
@@ -46,8 +46,6 @@ public class MareDbContext : DbContext
|
||||
modelBuilder.Entity<Auth>().ToTable("auth");
|
||||
modelBuilder.Entity<User>().ToTable("users");
|
||||
modelBuilder.Entity<User>().HasIndex(c => c.CharacterIdentification);
|
||||
modelBuilder.Entity<Alias>().ToTable("aliases");
|
||||
modelBuilder.Entity<Alias>().HasIndex(c => c.AliasUID);
|
||||
modelBuilder.Entity<FileCache>().ToTable("file_caches");
|
||||
modelBuilder.Entity<FileCache>().HasIndex(c => c.UploaderUID);
|
||||
modelBuilder.Entity<ClientPair>().ToTable("client_pairs");
|
||||
|
||||
Reference in New Issue
Block a user