mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 07:13:58 -05:00
a ton of stuff and fix migations
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@ -18,12 +20,14 @@ namespace SharedLibraryCore.Migrations
|
||||
columns: table => new
|
||||
{
|
||||
SnapshotId = table.Column<int>(nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
.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),
|
||||
CurrentSessionLength = table.Column<int>(nullable: false),
|
||||
CurrentStrain = table.Column<double>(nullable: false),
|
||||
CurrentViewAngleVector3Id = table.Column<int>(nullable: true),
|
||||
CurrentViewAngleId = table.Column<int>(nullable: true),
|
||||
Deaths = table.Column<int>(nullable: false),
|
||||
Distance = table.Column<double>(nullable: false),
|
||||
EloRating = table.Column<double>(nullable: false),
|
||||
@ -52,8 +56,8 @@ namespace SharedLibraryCore.Migrations
|
||||
principalColumn: "ClientId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EFACSnapshot_Vector3_CurrentViewAngleVector3Id",
|
||||
column: x => x.CurrentViewAngleVector3Id,
|
||||
name: "FK_EFACSnapshot_Vector3_CurrentViewAngleId",
|
||||
column: x => x.CurrentViewAngleId,
|
||||
principalTable: "Vector3",
|
||||
principalColumn: "Vector3Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
@ -88,9 +92,9 @@ namespace SharedLibraryCore.Migrations
|
||||
column: "ClientId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFACSnapshot_CurrentViewAngleVector3Id",
|
||||
name: "IX_EFACSnapshot_CurrentViewAngleId",
|
||||
table: "EFACSnapshot",
|
||||
column: "CurrentViewAngleVector3Id");
|
||||
column: "CurrentViewAngleId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EFACSnapshot_HitDestinationVector3Id",
|
||||
@ -107,13 +111,16 @@ namespace SharedLibraryCore.Migrations
|
||||
table: "EFACSnapshot",
|
||||
column: "LastStrainAngleVector3Id");
|
||||
|
||||
/* migrationBuilder.AddForeignKey(
|
||||
if (migrationBuilder.ActiveProvider != "Microsoft.EntityFrameworkCore.Sqlite")
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Vector3_EFACSnapshot_EFACSnapshotSnapshotId",
|
||||
table: "Vector3",
|
||||
column: "EFACSnapshotSnapshotId",
|
||||
principalTable: "EFACSnapshot",
|
||||
principalColumn: "SnapshotId",
|
||||
onDelete: ReferentialAction.Restrict);*/
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
|
Reference in New Issue
Block a user