mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 07:13:58 -05:00
update for database provider specific migrations
fix issues with live radar
This commit is contained in:
@ -1434,7 +1434,10 @@ namespace SharedLibraryCore.Commands
|
||||
/// </summary>
|
||||
public class PruneAdminsCommand : Command
|
||||
{
|
||||
public PruneAdminsCommand(CommandConfiguration config, ITranslationLookup translationLookup) : base(config, translationLookup)
|
||||
private readonly IDatabaseContextFactory _contextFactory;
|
||||
|
||||
public PruneAdminsCommand(CommandConfiguration config, ITranslationLookup translationLookup,
|
||||
IDatabaseContextFactory contextFactory) : base(config, translationLookup)
|
||||
{
|
||||
Name = "prune";
|
||||
Description = _translationLookup["COMMANDS_PRUNE_DESC"];
|
||||
@ -1476,16 +1479,15 @@ namespace SharedLibraryCore.Commands
|
||||
List<EFClient> inactiveUsers = null;
|
||||
// todo: make an event for this
|
||||
// update user roles
|
||||
using (var context = new DatabaseContext())
|
||||
{
|
||||
var lastActive = DateTime.UtcNow.AddDays(-inactiveDays);
|
||||
inactiveUsers = await context.Clients
|
||||
.Where(c => c.Level > Permission.Flagged && c.Level <= Permission.Moderator)
|
||||
.Where(c => c.LastConnection < lastActive)
|
||||
.ToListAsync();
|
||||
inactiveUsers.ForEach(c => c.SetLevel(Permission.User, E.Origin));
|
||||
await context.SaveChangesAsync();
|
||||
}
|
||||
await using var context = _contextFactory.CreateContext();
|
||||
var lastActive = DateTime.UtcNow.AddDays(-inactiveDays);
|
||||
inactiveUsers = await context.Clients
|
||||
.Where(c => c.Level > Permission.Flagged && c.Level <= Permission.Moderator)
|
||||
.Where(c => c.LastConnection < lastActive)
|
||||
.ToListAsync();
|
||||
inactiveUsers.ForEach(c => c.SetLevel(Permission.User, E.Origin));
|
||||
await context.SaveChangesAsync();
|
||||
|
||||
E.Origin.Tell(_translationLookup["COMMANDS_PRUNE_SUCCESS"].FormatExt(inactiveUsers.Count));
|
||||
}
|
||||
}
|
||||
|
@ -2,31 +2,30 @@
|
||||
using SharedLibraryCore.Database.Models;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using static SharedLibraryCore.Database.Models.EFClient;
|
||||
|
||||
namespace SharedLibraryCore.Database
|
||||
{
|
||||
public class ContextSeed
|
||||
public static class ContextSeed
|
||||
{
|
||||
private DatabaseContext context;
|
||||
|
||||
public ContextSeed(DatabaseContext ctx)
|
||||
public static async Task Seed(IDatabaseContextFactory contextFactory, CancellationToken token)
|
||||
{
|
||||
context = ctx;
|
||||
}
|
||||
var context = contextFactory.CreateContext();
|
||||
var strategy = context.Database.CreateExecutionStrategy();
|
||||
await strategy.ExecuteAsync(async () =>
|
||||
{
|
||||
await context.Database.MigrateAsync(token);
|
||||
});
|
||||
|
||||
public async Task Seed()
|
||||
{
|
||||
context.Database.Migrate();
|
||||
|
||||
if (context.AliasLinks.Count() == 0)
|
||||
if (!await context.AliasLinks.AnyAsync(token))
|
||||
{
|
||||
var link = new EFAliasLink();
|
||||
|
||||
context.Clients.Add(new EFClient()
|
||||
{
|
||||
ClientId = 1,
|
||||
Active = false,
|
||||
Connections = 0,
|
||||
FirstConnection = DateTime.UtcNow,
|
||||
@ -44,8 +43,8 @@ namespace SharedLibraryCore.Database
|
||||
},
|
||||
});
|
||||
|
||||
await context.SaveChangesAsync();
|
||||
await context.SaveChangesAsync(token);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace SharedLibraryCore.Database
|
||||
{
|
||||
public class DatabaseContext : DbContext
|
||||
public abstract class DatabaseContext : DbContext
|
||||
{
|
||||
public DbSet<EFClient> Clients { get; set; }
|
||||
public DbSet<EFAlias> Aliases { get; set; }
|
||||
@ -24,88 +24,6 @@ namespace SharedLibraryCore.Database
|
||||
public DbSet<EFMeta> EFMeta { get; set; }
|
||||
public DbSet<EFChangeHistory> EFChangeHistory { get; set; }
|
||||
|
||||
static string _ConnectionString;
|
||||
static string _provider;
|
||||
private static readonly ILoggerFactory _loggerFactory = LoggerFactory.Create(builder =>
|
||||
{
|
||||
builder.AddConsole()
|
||||
.AddDebug()
|
||||
.AddFilter((category, level) => true);
|
||||
});
|
||||
|
||||
public DatabaseContext(DbContextOptions<DatabaseContext> opt) : base(opt)
|
||||
{
|
||||
}
|
||||
|
||||
public DatabaseContext()
|
||||
{
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
public DatabaseContext(bool disableTracking) : this()
|
||||
{
|
||||
if (disableTracking)
|
||||
{
|
||||
this.ChangeTracker.AutoDetectChangesEnabled = false;
|
||||
this.ChangeTracker.LazyLoadingEnabled = false;
|
||||
this.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
this.ChangeTracker.AutoDetectChangesEnabled = true;
|
||||
this.ChangeTracker.LazyLoadingEnabled = true;
|
||||
this.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.TrackAll;
|
||||
}
|
||||
}
|
||||
|
||||
public DatabaseContext(string connStr, string provider) : this()
|
||||
{
|
||||
_ConnectionString = connStr;
|
||||
_provider = provider;
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
//optionsBuilder.UseLoggerFactory(_loggerFactory)
|
||||
// .EnableSensitiveDataLogging();
|
||||
|
||||
if (string.IsNullOrEmpty(_ConnectionString))
|
||||
{
|
||||
string currentPath = Utilities.OperatingDirectory;
|
||||
// allows the application to find the database file
|
||||
currentPath = !RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
|
||||
$"{Path.DirectorySeparatorChar}{currentPath}" :
|
||||
currentPath;
|
||||
|
||||
var connectionStringBuilder = new SqliteConnectionStringBuilder { DataSource = Path.Join(currentPath, "Database", "Database.db") };
|
||||
var connectionString = connectionStringBuilder.ToString();
|
||||
var connection = new SqliteConnection(connectionString);
|
||||
|
||||
if (!optionsBuilder.IsConfigured)
|
||||
{
|
||||
optionsBuilder.UseSqlite(connection);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
switch (_provider)
|
||||
{
|
||||
default:
|
||||
case "mysql":
|
||||
optionsBuilder.UseMySql(_ConnectionString, _options => _options.EnableRetryOnFailure());
|
||||
break;
|
||||
case "postgresql":
|
||||
optionsBuilder.UseNpgsql(_ConnectionString, _options => _options.EnableRetryOnFailure());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SetAuditColumns()
|
||||
{
|
||||
return;
|
||||
@ -129,6 +47,24 @@ namespace SharedLibraryCore.Database
|
||||
}
|
||||
}
|
||||
|
||||
public DatabaseContext()
|
||||
{
|
||||
if (!Utilities.IsMigration)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
public DatabaseContext(DbContextOptions<DatabaseContext> options) : base(options)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected DatabaseContext(DbContextOptions options) : base(options)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override Task<int> SaveChangesAsync(bool acceptAllChangesOnSuccess, CancellationToken cancellationToken = default)
|
||||
{
|
||||
SetAuditColumns();
|
||||
|
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace SharedLibraryCore.Database.MigrationContext
|
||||
{
|
||||
public class MySqlDatabaseContext : DatabaseContext
|
||||
{
|
||||
public MySqlDatabaseContext()
|
||||
{
|
||||
if (!Utilities.IsMigration)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
public MySqlDatabaseContext(DbContextOptions<MySqlDatabaseContext> options) : base(options)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
if (Utilities.IsMigration)
|
||||
{
|
||||
optionsBuilder.UseMySql("Server=127.0.0.1;Database=IW4MAdmin_Migration;Uid=root;Pwd=password;")
|
||||
.EnableDetailedErrors(true)
|
||||
.EnableSensitiveDataLogging(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace SharedLibraryCore.Database.MigrationContext
|
||||
{
|
||||
public class PostgresqlDatabaseContext : DatabaseContext
|
||||
{
|
||||
public PostgresqlDatabaseContext()
|
||||
{
|
||||
if (!Utilities.IsMigration)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
public PostgresqlDatabaseContext(DbContextOptions<PostgresqlDatabaseContext> options) : base(options)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
if (Utilities.IsMigration)
|
||||
{
|
||||
optionsBuilder.UseNpgsql(
|
||||
"Host=127.0.0.1;Database=IW4MAdmin_Migration;Username=postgres;Password=password;")
|
||||
.EnableDetailedErrors(true)
|
||||
.EnableSensitiveDataLogging(true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace SharedLibraryCore.Database.MigrationContext
|
||||
{
|
||||
public class SqliteDatabaseContext : DatabaseContext
|
||||
{
|
||||
public SqliteDatabaseContext()
|
||||
{
|
||||
if (!Utilities.IsMigration)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
public SqliteDatabaseContext(DbContextOptions<SqliteDatabaseContext> options) : base(options)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
if (Utilities.IsMigration)
|
||||
{
|
||||
optionsBuilder.UseSqlite("Data Source=IW4MAdmin_Migration.db")
|
||||
.EnableDetailedErrors(true)
|
||||
.EnableSensitiveDataLogging(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -24,7 +24,6 @@ namespace SharedLibraryCore.Interfaces
|
||||
IList<EFClient> GetActiveClients();
|
||||
IConfigurationHandler<ApplicationConfiguration> GetApplicationSettings();
|
||||
ClientService GetClientService();
|
||||
AliasService GetAliasService();
|
||||
PenaltyService GetPenaltyService();
|
||||
/// <summary>
|
||||
/// enumerates the registered plugin instances
|
||||
|
@ -6,11 +6,12 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180409183408_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
@ -4,7 +4,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class InitialCreate : Migration
|
||||
{
|
@ -6,11 +6,12 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180502195450_Update")]
|
||||
partial class Update
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class Update : Migration
|
||||
{
|
@ -6,11 +6,12 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180516023249_AddEloField")]
|
||||
partial class AddEloField
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddEloField : Migration
|
||||
{
|
@ -6,11 +6,12 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180517223349_AddRollingKDR")]
|
||||
partial class AddRollingKDR
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddRollingKDR : Migration
|
||||
{
|
@ -5,12 +5,12 @@ using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180531212903_AddAutomatedOffenseAndRatingHistory")]
|
||||
partial class AddAutomatedOffenseAndRatingHistory
|
||||
{
|
@ -4,7 +4,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddAutomatedOffenseAndRatingHistory : Migration
|
||||
{
|
@ -5,12 +5,12 @@ using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180601172317_AddActivityAmount")]
|
||||
partial class AddActivityAmount
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddActivityAmount : Migration
|
||||
{
|
@ -5,12 +5,12 @@ using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180602041758_AddClientMeta")]
|
||||
partial class AddClientMeta
|
||||
{
|
@ -4,7 +4,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddClientMeta : Migration
|
||||
{
|
@ -5,12 +5,12 @@ using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180605191706_AddEFACSnapshots")]
|
||||
partial class AddEFACSnapshots
|
||||
{
|
@ -4,7 +4,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddEFACSnapshots : Migration
|
||||
{
|
@ -5,12 +5,12 @@ using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180614014303_IndexForEFAlias")]
|
||||
partial class IndexForEFAlias
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class IndexForEFAlias : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180902035612_AddFractionAndIsKill")]
|
||||
partial class AddFractionAndIsKill
|
||||
{
|
@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddFractionAndIsKill : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180904154622_AddVisibilityPercentage")]
|
||||
partial class AddVisibilityPercentage
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddVisibilityPercentage : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180907020706_AddVision")]
|
||||
partial class AddVision
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddVision : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180908004053_AddWhenToRating")]
|
||||
partial class AddWhenToRating
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddWhenToRating : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180910221749_AddRatingIndexes")]
|
||||
partial class AddRatingIndexes
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddRatingIndexes : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180911184224_AddEFAliasNameIndex")]
|
||||
partial class AddEFAliasNameIndex
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddEFAliasNameIndex : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180911190823_AddEFAliasNameMaxLength24")]
|
||||
partial class AddEFAliasNameMaxLength24
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddEFAliasNameMaxLength24 : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180912015012_AddPreviousCurrentValueToEFChangeHistory")]
|
||||
partial class AddPreviousCurrentValueToEFChangeHistory
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddPreviousCurrentValueToEFChangeHistory : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180915163111_AddIndexToMessageTimeSent")]
|
||||
partial class AddIndexToMessageTimeSent
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddIndexToMessageTimeSent : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180922231310_RemoveACSnapShot")]
|
||||
partial class RemoveACSnapShot
|
||||
{
|
@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class RemoveACSnapShot : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20180922231600_ReaddACSnapshot")]
|
||||
partial class ReaddACSnapshot
|
||||
{
|
@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class ReaddACSnapshot : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20181014171848_MakePenaltyExpirationNullable")]
|
||||
partial class MakePenaltyExpirationNullable
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class MakePenaltyExpirationNullable : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20181125193243_MakeClientIPNullable")]
|
||||
partial class MakeClientIPNullable
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class MakeClientIPNullable : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20181127144417_AddEndpointToEFServerUpdateServerIdType")]
|
||||
partial class AddEndpointToEFServerUpdateServerIdType
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddEndpointToEFServerUpdateServerIdType : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20181216214513_AddEvadePenaltyFlag")]
|
||||
partial class AddEvadePenaltyFlag
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddEvadePenaltyFlag : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20190222234742_AddIndexToEFMeta-KeyAndClientId")]
|
||||
partial class AddIndexToEFMetaKeyAndClientId
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddIndexToEFMetaKeyAndClientId : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20190423142128_AddGameNameToEFServer")]
|
||||
partial class AddGameNameToEFServer
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddGameNameToEFServer : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20190615145212_AddAvgRecoilOffset")]
|
||||
partial class AddAvgRecoilOffset
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddAvgRecoilOffset : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20190615214055_AddRecoilOffsetToSnapshot")]
|
||||
partial class AddRecoilOffsetToSnapshot
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddRecoilOffsetToSnapshot : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20190725000309_AlterEFRatingIndex")]
|
||||
partial class AlterEFRatingIndex
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AlterEFRatingIndex : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20190802174908_AddSearchNameToEFAlias")]
|
||||
partial class AddSearchNameToEFAlias
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddSearchNameToEFAlias : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20190831210503_AvgSnapValueToClientStatistics")]
|
||||
partial class AvgSnapValueToClientStatistics
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AvgSnapValueToClientStatistics : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20190901180209_AddSnapHitCountToClientStatistics")]
|
||||
partial class AddSnapHitCountToClientStatistics
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddSnapHitCountToClientStatistics : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20190901223620_UseJunctionTableForSnapshotVector3")]
|
||||
partial class UseJunctionTableForSnapshotVector3
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class UseJunctionTableForSnapshotVector3 : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20190914011524_AddCurrentSnapValueToSnapshot")]
|
||||
partial class AddCurrentSnapValueToSnapshot
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddCurrentSnapValueToSnapshot : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20190914012015_AddSessionSnapHitsToSnapshot")]
|
||||
partial class AddSessionSnapHitsToSnapshot
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddSessionSnapHitsToSnapshot : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20191004172550_RenameClientHitLocationCountColumns")]
|
||||
partial class RenameClientHitLocationCountColumns
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class RenameClientHitLocationCountColumns : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20191030000713_EnforceUniqueIndexForEFAliasIPName")]
|
||||
partial class EnforceUniqueIndexForEFAliasIPName
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class EnforceUniqueIndexForEFAliasIPName : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20191225202141_SetCaseSensitiveCoallationForAliasNameMySQL")]
|
||||
partial class SetCaseSensitiveCoallationForAliasNameMySQL
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class SetCaseSensitiveCoallationForAliasNameMySQL : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20191230140947_AddMissingActiveColumns")]
|
||||
partial class AddMissingActiveColumns
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddMissingActiveColumns : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20200423225137_AddImpersonationIdToEFChangeHistory")]
|
||||
partial class AddImpersonationIdToEFChangeHistory
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddImpersonationIdToEFChangeHistory : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20200521203304_AddHostnameToEFServer")]
|
||||
partial class AddHostnameToEFServer
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddHostnameToEFServer : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20200819224119_AddIsPasswordProtectedColumn")]
|
||||
partial class AddIsPasswordProtectedColumn
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddIsPasswordProtectedColumn : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20201114232340_UpdateEFRatingIndex")]
|
||||
partial class UpdateEFRatingIndex
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class UpdateEFRatingIndex : Migration
|
||||
{
|
@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(DatabaseContext))]
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20201118023106_AddSentIngameFlagToClientMessage")]
|
||||
partial class AddSentIngameFlagToClientMessage
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace SharedLibraryCore.Migrations
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
public partial class AddSentIngameFlagToClientMessage : Migration
|
||||
{
|
931
SharedLibraryCore/Migrations/MySql/20201124024731_UpdateMigrationsToMySql.Designer.cs
generated
Normal file
931
SharedLibraryCore/Migrations/MySql/20201124024731_UpdateMigrationsToMySql.Designer.cs
generated
Normal file
@ -0,0 +1,931 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
[Migration("20201124024731_UpdateMigrationsToMySql")]
|
||||
partial class UpdateMigrationsToMySql
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.1.7")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFACSnapshot", b =>
|
||||
{
|
||||
b.Property<int>("SnapshotId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("CurrentSessionLength")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("CurrentStrain")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("CurrentViewAngleId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Deaths")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("Distance")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("EloRating")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("HitDestinationId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("HitLocation")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("HitOriginId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("HitType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Hits")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Kills")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("LastStrainAngleId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("RecoilOffset")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("SessionAngleOffset")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("SessionAverageSnapValue")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("SessionSPM")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("SessionScore")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SessionSnapHits")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("StrainAngleBetween")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("TimeSinceLastEvent")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("WeaponId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("When")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("SnapshotId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("CurrentViewAngleId");
|
||||
|
||||
b.HasIndex("HitDestinationId");
|
||||
|
||||
b.HasIndex("HitOriginId");
|
||||
|
||||
b.HasIndex("LastStrainAngleId");
|
||||
|
||||
b.ToTable("EFACSnapshot");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFACSnapshotVector3", b =>
|
||||
{
|
||||
b.Property<int>("ACSnapshotVector3Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("SnapshotId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Vector3Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ACSnapshotVector3Id");
|
||||
|
||||
b.HasIndex("SnapshotId");
|
||||
|
||||
b.HasIndex("Vector3Id");
|
||||
|
||||
b.ToTable("EFACSnapshotVector3");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientKill", b =>
|
||||
{
|
||||
b.Property<long>("KillId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("AttackerId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Damage")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("DeathOriginVector3Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DeathType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("Fraction")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("HitLoc")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("IsKill")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int?>("KillOriginVector3Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Map")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("ServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<int>("VictimId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("ViewAnglesVector3Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("VisibilityPercentage")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("Weapon")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("When")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("KillId");
|
||||
|
||||
b.HasIndex("AttackerId");
|
||||
|
||||
b.HasIndex("DeathOriginVector3Id");
|
||||
|
||||
b.HasIndex("KillOriginVector3Id");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.HasIndex("VictimId");
|
||||
|
||||
b.HasIndex("ViewAnglesVector3Id");
|
||||
|
||||
b.ToTable("EFClientKills");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientMessage", b =>
|
||||
{
|
||||
b.Property<long>("MessageId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Message")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<bool>("SentIngame")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<long>("ServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("TimeSent")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("MessageId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.HasIndex("TimeSent");
|
||||
|
||||
b.ToTable("EFClientMessages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientRatingHistory", b =>
|
||||
{
|
||||
b.Property<int>("RatingHistoryId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("RatingHistoryId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("EFClientRatingHistory");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics", b =>
|
||||
{
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("ServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<double>("AverageRecoilOffset")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("AverageSnapValue")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("Deaths")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("EloRating")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("Kills")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("MaxStrain")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("RollingWeightedKDR")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("SPM")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("Skill")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("SnapHitCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TimePlayed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("VisionAverage")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.HasKey("ClientId", "ServerId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.ToTable("EFClientStatistics");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFHitLocationCount", b =>
|
||||
{
|
||||
b.Property<int>("HitLocationCountId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("EFClientStatisticsClientId")
|
||||
.HasColumnName("EFClientStatisticsClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("EFClientStatisticsServerId")
|
||||
.HasColumnName("EFClientStatisticsServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<int>("HitCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("HitOffsetAverage")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("Location")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("MaxAngleDistance")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("HitLocationCountId");
|
||||
|
||||
b.HasIndex("EFClientStatisticsServerId");
|
||||
|
||||
b.HasIndex("EFClientStatisticsClientId", "EFClientStatisticsServerId");
|
||||
|
||||
b.ToTable("EFHitLocationCounts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFRating", b =>
|
||||
{
|
||||
b.Property<int>("RatingId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("ActivityAmount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Newest")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<double>("Performance")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("Ranking")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("RatingHistoryId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long?>("ServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("When")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("RatingId");
|
||||
|
||||
b.HasIndex("RatingHistoryId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.HasIndex("Performance", "Ranking", "When");
|
||||
|
||||
b.HasIndex("When", "ServerId", "Performance", "ActivityAmount");
|
||||
|
||||
b.ToTable("EFRating");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServer", b =>
|
||||
{
|
||||
b.Property<long>("ServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("EndPoint")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<int?>("GameName")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("HostName")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<bool>("IsPasswordProtected")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("Port")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ServerId");
|
||||
|
||||
b.ToTable("EFServers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServerStatistics", b =>
|
||||
{
|
||||
b.Property<int>("StatisticId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<long>("ServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("TotalKills")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("TotalPlayTime")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("StatisticId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.ToTable("EFServerStatistics");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAlias", b =>
|
||||
{
|
||||
b.Property<int>("AliasId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<DateTime>("DateAdded")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int?>("IPAddress")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("LinkId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin")
|
||||
.HasMaxLength(24);
|
||||
|
||||
b.Property<string>("SearchableName")
|
||||
.HasColumnType("varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin")
|
||||
.HasMaxLength(24);
|
||||
|
||||
b.HasKey("AliasId");
|
||||
|
||||
b.HasIndex("IPAddress");
|
||||
|
||||
b.HasIndex("LinkId");
|
||||
|
||||
b.HasIndex("Name");
|
||||
|
||||
b.HasIndex("SearchableName");
|
||||
|
||||
b.HasIndex("Name", "IPAddress")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("EFAlias");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAliasLink", b =>
|
||||
{
|
||||
b.Property<int>("AliasLinkId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.HasKey("AliasLinkId");
|
||||
|
||||
b.ToTable("EFAliasLinks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFChangeHistory", b =>
|
||||
{
|
||||
b.Property<int>("ChangeHistoryId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4")
|
||||
.HasMaxLength(128);
|
||||
|
||||
b.Property<string>("CurrentValue")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<int?>("ImpersonationEntityId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("OriginEntityId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("PreviousValue")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<int>("TargetEntityId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("TimeChanged")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("TypeOfChange")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ChangeHistoryId");
|
||||
|
||||
b.ToTable("EFChangeHistory");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFClient", b =>
|
||||
{
|
||||
b.Property<int>("ClientId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("AliasLinkId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Connections")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("CurrentAliasId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("FirstConnection")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("LastConnection")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("Level")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Masked")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<long>("NetworkId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<string>("PasswordSalt")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<int>("TotalConnectionTime")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ClientId");
|
||||
|
||||
b.HasIndex("AliasLinkId");
|
||||
|
||||
b.HasIndex("CurrentAliasId");
|
||||
|
||||
b.HasIndex("NetworkId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("EFClients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFMeta", b =>
|
||||
{
|
||||
b.Property<int>("MetaId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("Extra")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("varchar(32) CHARACTER SET utf8mb4")
|
||||
.HasMaxLength(32);
|
||||
|
||||
b.Property<DateTime>("Updated")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.HasKey("MetaId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("Key");
|
||||
|
||||
b.ToTable("EFMeta");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFPenalty", b =>
|
||||
{
|
||||
b.Property<int>("PenaltyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("AutomatedOffense")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<DateTime?>("Expires")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<bool>("IsEvadedOffense")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("LinkId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("OffenderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Offense")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<int>("PunisherId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("When")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("PenaltyId");
|
||||
|
||||
b.HasIndex("LinkId");
|
||||
|
||||
b.HasIndex("OffenderId");
|
||||
|
||||
b.HasIndex("PunisherId");
|
||||
|
||||
b.ToTable("EFPenalties");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Helpers.Vector3", b =>
|
||||
{
|
||||
b.Property<int>("Vector3Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("X")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("Y")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("Z")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("Vector3Id");
|
||||
|
||||
b.ToTable("Vector3");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFACSnapshot", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "CurrentViewAngle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CurrentViewAngleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "HitDestination")
|
||||
.WithMany()
|
||||
.HasForeignKey("HitDestinationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "HitOrigin")
|
||||
.WithMany()
|
||||
.HasForeignKey("HitOriginId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "LastStrainAngle")
|
||||
.WithMany()
|
||||
.HasForeignKey("LastStrainAngleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFACSnapshotVector3", b =>
|
||||
{
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFACSnapshot", "Snapshot")
|
||||
.WithMany("PredictedViewAngles")
|
||||
.HasForeignKey("SnapshotId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "Vector")
|
||||
.WithMany()
|
||||
.HasForeignKey("Vector3Id")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientKill", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Attacker")
|
||||
.WithMany()
|
||||
.HasForeignKey("AttackerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "DeathOrigin")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeathOriginVector3Id");
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "KillOrigin")
|
||||
.WithMany()
|
||||
.HasForeignKey("KillOriginVector3Id");
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Victim")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "ViewAngles")
|
||||
.WithMany()
|
||||
.HasForeignKey("ViewAnglesVector3Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientMessage", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientRatingHistory", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFHitLocationCount", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("EFClientStatisticsClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("EFClientStatisticsServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics", null)
|
||||
.WithMany("HitLocations")
|
||||
.HasForeignKey("EFClientStatisticsClientId", "EFClientStatisticsServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFRating", b =>
|
||||
{
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFClientRatingHistory", "RatingHistory")
|
||||
.WithMany("Ratings")
|
||||
.HasForeignKey("RatingHistoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServerStatistics", b =>
|
||||
{
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAlias", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "Link")
|
||||
.WithMany("Children")
|
||||
.HasForeignKey("LinkId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFClient", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "AliasLink")
|
||||
.WithMany()
|
||||
.HasForeignKey("AliasLinkId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAlias", "CurrentAlias")
|
||||
.WithMany()
|
||||
.HasForeignKey("CurrentAliasId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFMeta", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany("Meta")
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFPenalty", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "Link")
|
||||
.WithMany("ReceivedPenalties")
|
||||
.HasForeignKey("LinkId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Offender")
|
||||
.WithMany("ReceivedPenalties")
|
||||
.HasForeignKey("OffenderId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Punisher")
|
||||
.WithMany("AdministeredPenalties")
|
||||
.HasForeignKey("PunisherId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,929 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
|
||||
namespace SharedLibraryCore.Migrations.MySql
|
||||
{
|
||||
[DbContext(typeof(MySqlDatabaseContext))]
|
||||
partial class MySqlDatabaseContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "3.1.7")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFACSnapshot", b =>
|
||||
{
|
||||
b.Property<int>("SnapshotId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("CurrentSessionLength")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("CurrentStrain")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("CurrentViewAngleId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Deaths")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("Distance")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("EloRating")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("HitDestinationId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("HitLocation")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("HitOriginId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("HitType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Hits")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Kills")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("LastStrainAngleId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("RecoilOffset")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("SessionAngleOffset")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("SessionAverageSnapValue")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("SessionSPM")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("SessionScore")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SessionSnapHits")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("StrainAngleBetween")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("TimeSinceLastEvent")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("WeaponId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("When")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("SnapshotId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("CurrentViewAngleId");
|
||||
|
||||
b.HasIndex("HitDestinationId");
|
||||
|
||||
b.HasIndex("HitOriginId");
|
||||
|
||||
b.HasIndex("LastStrainAngleId");
|
||||
|
||||
b.ToTable("EFACSnapshot");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFACSnapshotVector3", b =>
|
||||
{
|
||||
b.Property<int>("ACSnapshotVector3Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("SnapshotId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Vector3Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ACSnapshotVector3Id");
|
||||
|
||||
b.HasIndex("SnapshotId");
|
||||
|
||||
b.HasIndex("Vector3Id");
|
||||
|
||||
b.ToTable("EFACSnapshotVector3");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientKill", b =>
|
||||
{
|
||||
b.Property<long>("KillId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("AttackerId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Damage")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("DeathOriginVector3Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DeathType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("Fraction")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("HitLoc")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("IsKill")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int?>("KillOriginVector3Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Map")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("ServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<int>("VictimId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("ViewAnglesVector3Id")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("VisibilityPercentage")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("Weapon")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("When")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("KillId");
|
||||
|
||||
b.HasIndex("AttackerId");
|
||||
|
||||
b.HasIndex("DeathOriginVector3Id");
|
||||
|
||||
b.HasIndex("KillOriginVector3Id");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.HasIndex("VictimId");
|
||||
|
||||
b.HasIndex("ViewAnglesVector3Id");
|
||||
|
||||
b.ToTable("EFClientKills");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientMessage", b =>
|
||||
{
|
||||
b.Property<long>("MessageId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Message")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<bool>("SentIngame")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<long>("ServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("TimeSent")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("MessageId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.HasIndex("TimeSent");
|
||||
|
||||
b.ToTable("EFClientMessages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientRatingHistory", b =>
|
||||
{
|
||||
b.Property<int>("RatingHistoryId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("RatingHistoryId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.ToTable("EFClientRatingHistory");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics", b =>
|
||||
{
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("ServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<double>("AverageRecoilOffset")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("AverageSnapValue")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("Deaths")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("EloRating")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("Kills")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("MaxStrain")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("RollingWeightedKDR")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("SPM")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<double>("Skill")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("SnapHitCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TimePlayed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<double>("VisionAverage")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.HasKey("ClientId", "ServerId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.ToTable("EFClientStatistics");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFHitLocationCount", b =>
|
||||
{
|
||||
b.Property<int>("HitLocationCountId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("EFClientStatisticsClientId")
|
||||
.HasColumnName("EFClientStatisticsClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("EFClientStatisticsServerId")
|
||||
.HasColumnName("EFClientStatisticsServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<int>("HitCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("HitOffsetAverage")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("Location")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("MaxAngleDistance")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("HitLocationCountId");
|
||||
|
||||
b.HasIndex("EFClientStatisticsServerId");
|
||||
|
||||
b.HasIndex("EFClientStatisticsClientId", "EFClientStatisticsServerId");
|
||||
|
||||
b.ToTable("EFHitLocationCounts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFRating", b =>
|
||||
{
|
||||
b.Property<int>("RatingId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("ActivityAmount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Newest")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<double>("Performance")
|
||||
.HasColumnType("double");
|
||||
|
||||
b.Property<int>("Ranking")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("RatingHistoryId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long?>("ServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("When")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("RatingId");
|
||||
|
||||
b.HasIndex("RatingHistoryId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.HasIndex("Performance", "Ranking", "When");
|
||||
|
||||
b.HasIndex("When", "ServerId", "Performance", "ActivityAmount");
|
||||
|
||||
b.ToTable("EFRating");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServer", b =>
|
||||
{
|
||||
b.Property<long>("ServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("EndPoint")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<int?>("GameName")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("HostName")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<bool>("IsPasswordProtected")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("Port")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ServerId");
|
||||
|
||||
b.ToTable("EFServers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServerStatistics", b =>
|
||||
{
|
||||
b.Property<int>("StatisticId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<long>("ServerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("TotalKills")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("TotalPlayTime")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("StatisticId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.ToTable("EFServerStatistics");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAlias", b =>
|
||||
{
|
||||
b.Property<int>("AliasId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<DateTime>("DateAdded")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int?>("IPAddress")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("LinkId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin")
|
||||
.HasMaxLength(24);
|
||||
|
||||
b.Property<string>("SearchableName")
|
||||
.HasColumnType("varchar(24) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin")
|
||||
.HasMaxLength(24);
|
||||
|
||||
b.HasKey("AliasId");
|
||||
|
||||
b.HasIndex("IPAddress");
|
||||
|
||||
b.HasIndex("LinkId");
|
||||
|
||||
b.HasIndex("Name");
|
||||
|
||||
b.HasIndex("SearchableName");
|
||||
|
||||
b.HasIndex("Name", "IPAddress")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("EFAlias");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAliasLink", b =>
|
||||
{
|
||||
b.Property<int>("AliasLinkId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.HasKey("AliasLinkId");
|
||||
|
||||
b.ToTable("EFAliasLinks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFChangeHistory", b =>
|
||||
{
|
||||
b.Property<int>("ChangeHistoryId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasColumnType("varchar(128) CHARACTER SET utf8mb4")
|
||||
.HasMaxLength(128);
|
||||
|
||||
b.Property<string>("CurrentValue")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<int?>("ImpersonationEntityId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("OriginEntityId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("PreviousValue")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<int>("TargetEntityId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("TimeChanged")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("TypeOfChange")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ChangeHistoryId");
|
||||
|
||||
b.ToTable("EFChangeHistory");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFClient", b =>
|
||||
{
|
||||
b.Property<int>("ClientId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("AliasLinkId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Connections")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("CurrentAliasId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("FirstConnection")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("LastConnection")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("Level")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Masked")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<long>("NetworkId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<string>("PasswordSalt")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<int>("TotalConnectionTime")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ClientId");
|
||||
|
||||
b.HasIndex("AliasLinkId");
|
||||
|
||||
b.HasIndex("CurrentAliasId");
|
||||
|
||||
b.HasIndex("NetworkId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("EFClients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFMeta", b =>
|
||||
{
|
||||
b.Property<int>("MetaId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("Extra")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasColumnType("varchar(32) CHARACTER SET utf8mb4")
|
||||
.HasMaxLength(32);
|
||||
|
||||
b.Property<DateTime>("Updated")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.HasKey("MetaId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("Key");
|
||||
|
||||
b.ToTable("EFMeta");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFPenalty", b =>
|
||||
{
|
||||
b.Property<int>("PenaltyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("AutomatedOffense")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<DateTime?>("Expires")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<bool>("IsEvadedOffense")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("LinkId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("OffenderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Offense")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<int>("PunisherId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("When")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("PenaltyId");
|
||||
|
||||
b.HasIndex("LinkId");
|
||||
|
||||
b.HasIndex("OffenderId");
|
||||
|
||||
b.HasIndex("PunisherId");
|
||||
|
||||
b.ToTable("EFPenalties");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Helpers.Vector3", b =>
|
||||
{
|
||||
b.Property<int>("Vector3Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<float>("X")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("Y")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<float>("Z")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.HasKey("Vector3Id");
|
||||
|
||||
b.ToTable("Vector3");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFACSnapshot", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "CurrentViewAngle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CurrentViewAngleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "HitDestination")
|
||||
.WithMany()
|
||||
.HasForeignKey("HitDestinationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "HitOrigin")
|
||||
.WithMany()
|
||||
.HasForeignKey("HitOriginId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "LastStrainAngle")
|
||||
.WithMany()
|
||||
.HasForeignKey("LastStrainAngleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFACSnapshotVector3", b =>
|
||||
{
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFACSnapshot", "Snapshot")
|
||||
.WithMany("PredictedViewAngles")
|
||||
.HasForeignKey("SnapshotId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "Vector")
|
||||
.WithMany()
|
||||
.HasForeignKey("Vector3Id")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientKill", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Attacker")
|
||||
.WithMany()
|
||||
.HasForeignKey("AttackerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "DeathOrigin")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeathOriginVector3Id");
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "KillOrigin")
|
||||
.WithMany()
|
||||
.HasForeignKey("KillOriginVector3Id");
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Victim")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "ViewAngles")
|
||||
.WithMany()
|
||||
.HasForeignKey("ViewAnglesVector3Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientMessage", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientRatingHistory", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFHitLocationCount", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("EFClientStatisticsClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("EFClientStatisticsServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics", null)
|
||||
.WithMany("HitLocations")
|
||||
.HasForeignKey("EFClientStatisticsClientId", "EFClientStatisticsServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFRating", b =>
|
||||
{
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFClientRatingHistory", "RatingHistory")
|
||||
.WithMany("Ratings")
|
||||
.HasForeignKey("RatingHistoryId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServerStatistics", b =>
|
||||
{
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAlias", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "Link")
|
||||
.WithMany("Children")
|
||||
.HasForeignKey("LinkId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFClient", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "AliasLink")
|
||||
.WithMany()
|
||||
.HasForeignKey("AliasLinkId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAlias", "CurrentAlias")
|
||||
.WithMany()
|
||||
.HasForeignKey("CurrentAliasId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFMeta", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany("Meta")
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFPenalty", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "Link")
|
||||
.WithMany("ReceivedPenalties")
|
||||
.HasForeignKey("LinkId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Offender")
|
||||
.WithMany("ReceivedPenalties")
|
||||
.HasForeignKey("OffenderId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Punisher")
|
||||
.WithMany("AdministeredPenalties")
|
||||
.HasForeignKey("PunisherId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
431
SharedLibraryCore/Migrations/Postgresql/20180409183408_InitialCreate.Designer.cs
generated
Normal file
431
SharedLibraryCore/Migrations/Postgresql/20180409183408_InitialCreate.Designer.cs
generated
Normal file
@ -0,0 +1,431 @@
|
||||
// <auto-generated />
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.EntityFrameworkCore.Storage.Internal;
|
||||
using SharedLibraryCore.Database;
|
||||
using SharedLibraryCore.Database.MigrationContext;
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Migrations.Postgresql
|
||||
{
|
||||
[DbContext(typeof(PostgresqlDatabaseContext))]
|
||||
[Migration("20180409183408_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "2.0.2-rtm-10011");
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientKill", b =>
|
||||
{
|
||||
b.Property<long>("KillId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("AttackerId");
|
||||
|
||||
b.Property<int>("Damage");
|
||||
|
||||
b.Property<int?>("DeathOriginVector3Id");
|
||||
|
||||
b.Property<int>("DeathType");
|
||||
|
||||
b.Property<int>("HitLoc");
|
||||
|
||||
b.Property<int?>("KillOriginVector3Id");
|
||||
|
||||
b.Property<int>("Map");
|
||||
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<int>("VictimId");
|
||||
|
||||
b.Property<int?>("ViewAnglesVector3Id");
|
||||
|
||||
b.Property<int>("Weapon");
|
||||
|
||||
b.Property<DateTime>("When");
|
||||
|
||||
b.HasKey("KillId");
|
||||
|
||||
b.HasIndex("AttackerId");
|
||||
|
||||
b.HasIndex("DeathOriginVector3Id");
|
||||
|
||||
b.HasIndex("KillOriginVector3Id");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.HasIndex("VictimId");
|
||||
|
||||
b.HasIndex("ViewAnglesVector3Id");
|
||||
|
||||
b.ToTable("EFClientKills");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientMessage", b =>
|
||||
{
|
||||
b.Property<long>("MessageId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("ClientId");
|
||||
|
||||
b.Property<string>("Message");
|
||||
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<DateTime>("TimeSent");
|
||||
|
||||
b.HasKey("MessageId");
|
||||
|
||||
b.HasIndex("ClientId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.ToTable("EFClientMessages");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics", b =>
|
||||
{
|
||||
b.Property<int>("ClientId");
|
||||
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("Deaths");
|
||||
|
||||
b.Property<int>("Kills");
|
||||
|
||||
b.Property<double>("SPM");
|
||||
|
||||
b.Property<double>("Skill");
|
||||
|
||||
b.Property<int>("TimePlayed");
|
||||
|
||||
b.HasKey("ClientId", "ServerId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.ToTable("EFClientStatistics");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFHitLocationCount", b =>
|
||||
{
|
||||
b.Property<int>("HitLocationCountId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("ClientId")
|
||||
.HasColumnName("EFClientStatistics_ClientId");
|
||||
|
||||
b.Property<int>("HitCount");
|
||||
|
||||
b.Property<float>("HitOffsetAverage");
|
||||
|
||||
b.Property<int>("Location");
|
||||
|
||||
b.Property<int>("ServerId")
|
||||
.HasColumnName("EFClientStatistics_ServerId");
|
||||
|
||||
b.HasKey("HitLocationCountId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.HasIndex("ClientId", "ServerId");
|
||||
|
||||
b.ToTable("EFHitLocationCounts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServer", b =>
|
||||
{
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("Port");
|
||||
|
||||
b.HasKey("ServerId");
|
||||
|
||||
b.ToTable("EFServers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServerStatistics", b =>
|
||||
{
|
||||
b.Property<int>("StatisticId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("ServerId");
|
||||
|
||||
b.Property<long>("TotalKills");
|
||||
|
||||
b.Property<long>("TotalPlayTime");
|
||||
|
||||
b.HasKey("StatisticId");
|
||||
|
||||
b.HasIndex("ServerId");
|
||||
|
||||
b.ToTable("EFServerStatistics");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAlias", b =>
|
||||
{
|
||||
b.Property<int>("AliasId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<DateTime>("DateAdded");
|
||||
|
||||
b.Property<int>("IPAddress");
|
||||
|
||||
b.Property<int>("LinkId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(24);
|
||||
|
||||
b.HasKey("AliasId");
|
||||
|
||||
b.HasIndex("LinkId");
|
||||
|
||||
b.ToTable("EFAlias");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAliasLink", b =>
|
||||
{
|
||||
b.Property<int>("AliasLinkId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.HasKey("AliasLinkId");
|
||||
|
||||
b.ToTable("EFAliasLinks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFClient", b =>
|
||||
{
|
||||
b.Property<int>("ClientId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int>("AliasLinkId");
|
||||
|
||||
b.Property<int>("Connections");
|
||||
|
||||
b.Property<int>("CurrentAliasId");
|
||||
|
||||
b.Property<DateTime>("FirstConnection");
|
||||
|
||||
b.Property<DateTime>("LastConnection");
|
||||
|
||||
b.Property<int>("Level");
|
||||
|
||||
b.Property<bool>("Masked");
|
||||
|
||||
b.Property<long>("NetworkId");
|
||||
|
||||
b.Property<string>("Password");
|
||||
|
||||
b.Property<string>("PasswordSalt");
|
||||
|
||||
b.Property<int>("TotalConnectionTime");
|
||||
|
||||
b.HasKey("ClientId");
|
||||
|
||||
b.HasIndex("AliasLinkId");
|
||||
|
||||
b.HasIndex("CurrentAliasId");
|
||||
|
||||
b.HasIndex("NetworkId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("EFClients");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFPenalty", b =>
|
||||
{
|
||||
b.Property<int>("PenaltyId")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<DateTime>("Expires");
|
||||
|
||||
b.Property<int>("LinkId");
|
||||
|
||||
b.Property<int>("OffenderId");
|
||||
|
||||
b.Property<string>("Offense")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("PunisherId");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.Property<DateTime>("When");
|
||||
|
||||
b.HasKey("PenaltyId");
|
||||
|
||||
b.HasIndex("LinkId");
|
||||
|
||||
b.HasIndex("OffenderId");
|
||||
|
||||
b.HasIndex("PunisherId");
|
||||
|
||||
b.ToTable("EFPenalties");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Helpers.Vector3", b =>
|
||||
{
|
||||
b.Property<int>("Vector3Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<float>("X");
|
||||
|
||||
b.Property<float>("Y");
|
||||
|
||||
b.Property<float>("Z");
|
||||
|
||||
b.HasKey("Vector3Id");
|
||||
|
||||
b.ToTable("Vector3");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientKill", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Attacker")
|
||||
.WithMany()
|
||||
.HasForeignKey("AttackerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "DeathOrigin")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeathOriginVector3Id");
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "KillOrigin")
|
||||
.WithMany()
|
||||
.HasForeignKey("KillOriginVector3Id");
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Victim")
|
||||
.WithMany()
|
||||
.HasForeignKey("VictimId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Helpers.Vector3", "ViewAngles")
|
||||
.WithMany()
|
||||
.HasForeignKey("ViewAnglesVector3Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientMessage", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFHitLocationCount", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Client")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFClientStatistics")
|
||||
.WithMany("HitLocations")
|
||||
.HasForeignKey("ClientId", "ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IW4MAdmin.Plugins.Stats.Models.EFServerStatistics", b =>
|
||||
{
|
||||
b.HasOne("IW4MAdmin.Plugins.Stats.Models.EFServer", "Server")
|
||||
.WithMany()
|
||||
.HasForeignKey("ServerId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFAlias", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "Link")
|
||||
.WithMany("Children")
|
||||
.HasForeignKey("LinkId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFClient", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "AliasLink")
|
||||
.WithMany()
|
||||
.HasForeignKey("AliasLinkId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAlias", "CurrentAlias")
|
||||
.WithMany()
|
||||
.HasForeignKey("CurrentAliasId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("SharedLibraryCore.Database.Models.EFPenalty", b =>
|
||||
{
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFAliasLink", "Link")
|
||||
.WithMany("ReceivedPenalties")
|
||||
.HasForeignKey("LinkId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Offender")
|
||||
.WithMany("ReceivedPenalties")
|
||||
.HasForeignKey("OffenderId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("SharedLibraryCore.Database.Models.EFClient", "Punisher")
|
||||
.WithMany("AdministeredPenalties")
|
||||
.HasForeignKey("PunisherId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,483 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SharedLibraryCore.Migrations.Postgresql
|
||||
{
|
||||
public partial class InitialCreate : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFAliasLinks",
|
||||
columns: table => new
|
||||
{
|
||||
AliasLinkId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Active = table.Column<bool>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFAliasLinks", x => x.AliasLinkId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFServers",
|
||||
columns: table => new
|
||||
{
|
||||
ServerId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
Port = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFServers", x => x.ServerId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Vector3",
|
||||
columns: table => new
|
||||
{
|
||||
Vector3Id = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
X = table.Column<float>(nullable: false),
|
||||
Y = table.Column<float>(nullable: false),
|
||||
Z = table.Column<float>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Vector3", x => x.Vector3Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFAlias",
|
||||
columns: table => new
|
||||
{
|
||||
AliasId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
DateAdded = table.Column<DateTime>(nullable: false),
|
||||
IPAddress = table.Column<int>(nullable: false),
|
||||
LinkId = table.Column<int>(nullable: false),
|
||||
Name = table.Column<string>(maxLength: 128, nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFAlias", x => x.AliasId);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFAlias_EFAliasLinks_LinkId",
|
||||
column: x => x.LinkId,
|
||||
principalTable: "EFAliasLinks",
|
||||
principalColumn: "AliasLinkId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFServerStatistics",
|
||||
columns: table => new
|
||||
{
|
||||
StatisticId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
ServerId = table.Column<int>(nullable: false),
|
||||
TotalKills = table.Column<long>(nullable: false),
|
||||
TotalPlayTime = table.Column<long>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFServerStatistics", x => x.StatisticId);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFServerStatistics_EFServers_ServerId",
|
||||
column: x => x.ServerId,
|
||||
principalTable: "EFServers",
|
||||
principalColumn: "ServerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFClients",
|
||||
columns: table => new
|
||||
{
|
||||
ClientId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
AliasLinkId = table.Column<int>(nullable: false),
|
||||
Connections = table.Column<int>(nullable: false),
|
||||
CurrentAliasId = table.Column<int>(nullable: false),
|
||||
FirstConnection = table.Column<DateTime>(nullable: false),
|
||||
LastConnection = table.Column<DateTime>(nullable: false),
|
||||
Level = table.Column<int>(nullable: false),
|
||||
Masked = table.Column<bool>(nullable: false),
|
||||
NetworkId = table.Column<long>(nullable: false),
|
||||
Password = table.Column<string>(nullable: true),
|
||||
PasswordSalt = table.Column<string>(nullable: true),
|
||||
TotalConnectionTime = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFClients", x => x.ClientId);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClients_EFAliasLinks_AliasLinkId",
|
||||
column: x => x.AliasLinkId,
|
||||
principalTable: "EFAliasLinks",
|
||||
principalColumn: "AliasLinkId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClients_EFAlias_CurrentAliasId",
|
||||
column: x => x.CurrentAliasId,
|
||||
principalTable: "EFAlias",
|
||||
principalColumn: "AliasId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFClientKills",
|
||||
columns: table => new
|
||||
{
|
||||
KillId = table.Column<long>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true).
|
||||
Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
AttackerId = table.Column<int>(nullable: false),
|
||||
Damage = table.Column<int>(nullable: false),
|
||||
DeathOriginVector3Id = table.Column<int>(nullable: true),
|
||||
DeathType = table.Column<int>(nullable: false),
|
||||
HitLoc = table.Column<int>(nullable: false),
|
||||
KillOriginVector3Id = table.Column<int>(nullable: true),
|
||||
Map = table.Column<int>(nullable: false),
|
||||
ServerId = table.Column<int>(nullable: false),
|
||||
VictimId = table.Column<int>(nullable: false),
|
||||
ViewAnglesVector3Id = table.Column<int>(nullable: true),
|
||||
Weapon = table.Column<int>(nullable: false),
|
||||
When = table.Column<DateTime>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFClientKills", x => x.KillId);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientKills_EFClients_AttackerId",
|
||||
column: x => x.AttackerId,
|
||||
principalTable: "EFClients",
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientKills_Vector3_DeathOriginVector3Id",
|
||||
column: x => x.DeathOriginVector3Id,
|
||||
principalTable: "Vector3",
|
||||
principalColumn: "Vector3Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientKills_Vector3_KillOriginVector3Id",
|
||||
column: x => x.KillOriginVector3Id,
|
||||
principalTable: "Vector3",
|
||||
principalColumn: "Vector3Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientKills_EFServers_ServerId",
|
||||
column: x => x.ServerId,
|
||||
principalTable: "EFServers",
|
||||
principalColumn: "ServerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientKills_EFClients_VictimId",
|
||||
column: x => x.VictimId,
|
||||
principalTable: "EFClients",
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientKills_Vector3_ViewAnglesVector3Id",
|
||||
column: x => x.ViewAnglesVector3Id,
|
||||
principalTable: "Vector3",
|
||||
principalColumn: "Vector3Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFClientMessages",
|
||||
columns: table => new
|
||||
{
|
||||
MessageId = table.Column<long>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
ClientId = table.Column<int>(nullable: false),
|
||||
Message = table.Column<string>(nullable: true),
|
||||
ServerId = table.Column<int>(nullable: false),
|
||||
TimeSent = table.Column<DateTime>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFClientMessages", x => x.MessageId);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientMessages_EFClients_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "EFClients",
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientMessages_EFServers_ServerId",
|
||||
column: x => x.ServerId,
|
||||
principalTable: "EFServers",
|
||||
principalColumn: "ServerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFClientStatistics",
|
||||
columns: table => new
|
||||
{
|
||||
ClientId = table.Column<int>(nullable: false),
|
||||
ServerId = table.Column<int>(nullable: false),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
Deaths = table.Column<int>(nullable: false),
|
||||
Kills = table.Column<int>(nullable: false),
|
||||
SPM = table.Column<double>(nullable: false),
|
||||
Skill = table.Column<double>(nullable: false),
|
||||
TimePlayed = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFClientStatistics", x => new { x.ClientId, x.ServerId });
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientStatistics_EFClients_ClientId",
|
||||
column: x => x.ClientId,
|
||||
principalTable: "EFClients",
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFClientStatistics_EFServers_ServerId",
|
||||
column: x => x.ServerId,
|
||||
principalTable: "EFServers",
|
||||
principalColumn: "ServerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFPenalties",
|
||||
columns: table => new
|
||||
{
|
||||
PenaltyId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
Expires = table.Column<DateTime>(nullable: false),
|
||||
LinkId = table.Column<int>(nullable: false),
|
||||
OffenderId = table.Column<int>(nullable: false),
|
||||
Offense = table.Column<string>(nullable: false),
|
||||
PunisherId = table.Column<int>(nullable: false),
|
||||
Type = table.Column<int>(nullable: false),
|
||||
When = table.Column<DateTime>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFPenalties", x => x.PenaltyId);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFPenalties_EFAliasLinks_LinkId",
|
||||
column: x => x.LinkId,
|
||||
principalTable: "EFAliasLinks",
|
||||
principalColumn: "AliasLinkId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFPenalties_EFClients_OffenderId",
|
||||
column: x => x.OffenderId,
|
||||
principalTable: "EFClients",
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFPenalties_EFClients_PunisherId",
|
||||
column: x => x.PunisherId,
|
||||
principalTable: "EFClients",
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EFHitLocationCounts",
|
||||
columns: table => new
|
||||
{
|
||||
HitLocationCountId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true).
|
||||
Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn).
|
||||
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Active = table.Column<bool>(nullable: false),
|
||||
EFClientStatistics_ClientId = table.Column<int>(nullable: false),
|
||||
HitCount = table.Column<int>(nullable: false),
|
||||
HitOffsetAverage = table.Column<float>(nullable: false),
|
||||
Location = table.Column<int>(nullable: false),
|
||||
EFClientStatistics_ServerId = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EFHitLocationCounts", x => x.HitLocationCountId);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFHitLocationCounts_EFClients_EFClientStatistics_ClientId",
|
||||
column: x => x.EFClientStatistics_ClientId,
|
||||
principalTable: "EFClients",
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFHitLocationCounts_EFServers_EFClientStatistics_ServerId",
|
||||
column: x => x.EFClientStatistics_ServerId,
|
||||
principalTable: "EFServers",
|
||||
principalColumn: "ServerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFHitLocationCounts_EFClientStatistics_EFClientStatistics_ClientId_EFClientStatistics_ServerId",
|
||||
columns: x => new { x.EFClientStatistics_ClientId, x.EFClientStatistics_ServerId },
|
||||
principalTable: "EFClientStatistics",
|
||||
principalColumns: new[] { "ClientId", "ServerId" },
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFAlias_LinkId",
|
||||
table: "EFAlias",
|
||||
column: "LinkId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientKills_AttackerId",
|
||||
table: "EFClientKills",
|
||||
column: "AttackerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientKills_DeathOriginVector3Id",
|
||||
table: "EFClientKills",
|
||||
column: "DeathOriginVector3Id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientKills_KillOriginVector3Id",
|
||||
table: "EFClientKills",
|
||||
column: "KillOriginVector3Id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientKills_ServerId",
|
||||
table: "EFClientKills",
|
||||
column: "ServerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientKills_VictimId",
|
||||
table: "EFClientKills",
|
||||
column: "VictimId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientKills_ViewAnglesVector3Id",
|
||||
table: "EFClientKills",
|
||||
column: "ViewAnglesVector3Id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientMessages_ClientId",
|
||||
table: "EFClientMessages",
|
||||
column: "ClientId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientMessages_ServerId",
|
||||
table: "EFClientMessages",
|
||||
column: "ServerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClients_AliasLinkId",
|
||||
table: "EFClients",
|
||||
column: "AliasLinkId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClients_CurrentAliasId",
|
||||
table: "EFClients",
|
||||
column: "CurrentAliasId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClients_NetworkId",
|
||||
table: "EFClients",
|
||||
column: "NetworkId",
|
||||
unique: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFClientStatistics_ServerId",
|
||||
table: "EFClientStatistics",
|
||||
column: "ServerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFHitLocationCounts_EFClientStatistics_ServerId",
|
||||
table: "EFHitLocationCounts",
|
||||
column: "EFClientStatistics_ServerId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFHitLocationCounts_EFClientStatistics_ClientId_EFClientStatistics_ServerId",
|
||||
table: "EFHitLocationCounts",
|
||||
columns: new[] { "EFClientStatistics_ClientId", "EFClientStatistics_ServerId" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFPenalties_LinkId",
|
||||
table: "EFPenalties",
|
||||
column: "LinkId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFPenalties_OffenderId",
|
||||
table: "EFPenalties",
|
||||
column: "OffenderId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFPenalties_PunisherId",
|
||||
table: "EFPenalties",
|
||||
column: "PunisherId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFServerStatistics_ServerId",
|
||||
table: "EFServerStatistics",
|
||||
column: "ServerId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFClientKills");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFClientMessages");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFHitLocationCounts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFPenalties");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFServerStatistics");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Vector3");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFClientStatistics");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFClients");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFServers");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFAlias");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EFAliasLinks");
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user