mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-14 17:18:32 -05:00
Moved from SQLITE to EntityFramework.
Lots of things are broken!
This commit is contained in:
32
SharedLibrary/Database/Initializer.cs
Normal file
32
SharedLibrary/Database/Initializer.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SharedLibrary.Database
|
||||
{
|
||||
public class Initializer : DropCreateDatabaseIfModelChanges<IW4MAdminDatabaseContext>
|
||||
{
|
||||
protected override void Seed(IW4MAdminDatabaseContext context)
|
||||
{
|
||||
context.Clients.Add(new Models.EFClient()
|
||||
{
|
||||
Active = false,
|
||||
Connections = 0,
|
||||
AliasLink = new Models.EFAliasLink(),
|
||||
FirstConnection = DateTime.UtcNow,
|
||||
IPAddress = "127.0.0.1",
|
||||
LastConnection = DateTime.UtcNow,
|
||||
Level = Objects.Player.Permission.Console,
|
||||
Name = "IW4MAdmin",
|
||||
Masked = true,
|
||||
NetworkId = "0000000000000000",
|
||||
});
|
||||
|
||||
base.Seed(context);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user