Server ban exemption system (#15076)

This commit is contained in:
Pieter-Jan Briers
2023-04-03 02:24:55 +02:00
committed by GitHub
parent e037d12899
commit c8e90e561b
26 changed files with 8681 additions and 135 deletions

View File

@@ -1,5 +1,9 @@
using Microsoft.EntityFrameworkCore;
#if TOOLS
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using SQLitePCL;
// ReSharper disable UnusedType.Global
namespace Content.Server.Database;
@@ -18,8 +22,14 @@ public sealed class DesignTimeContextFactorySqlite : IDesignTimeDbContextFactory
{
public SqliteServerDbContext CreateDbContext(string[] args)
{
#if !USE_SYSTEM_SQLITE
raw.SetProvider(new SQLite3Provider_e_sqlite3());
#endif
var optionsBuilder = new DbContextOptionsBuilder<SqliteServerDbContext>();
optionsBuilder.UseSqlite("Data Source=:memory:");
return new SqliteServerDbContext(optionsBuilder.Options);
}
}
#endif