Server ban exemption system (#15076)
This commit is contained in:
committed by
GitHub
parent
e037d12899
commit
c8e90e561b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user