IW4M-Admin/Data/Migrations/Sqlite/20180902035612_AddFractionAndIsKill.cs
RaidMax c5375b661b huge commit for advanced stats feature.
broke data out into its own library.
may be breaking changes with existing plugins
2021-03-22 11:09:25 -05:00

64 lines
2.4 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace Data.Migrations.Sqlite
{
public partial class AddFractionAndIsKill : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<double>(
name: "Fraction",
table: "EFClientKills",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<bool>(
name: "IsKill",
table: "EFClientKills",
nullable: false,
defaultValue: false);
migrationBuilder.CreateTable(
name: "EFChangeHistory",
columns: table => new
{
ChangeHistoryId = 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),
OriginEntityId = table.Column<int>(nullable: false),
TargetEntityId = table.Column<int>(nullable: false),
TypeOfChange = table.Column<int>(nullable: false),
TimeChanged = table.Column<DateTime>(nullable: false),
Comment = table.Column<string>(maxLength: 128, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_EFChangeHistory", x => x.ChangeHistoryId);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "EFChangeHistory");
migrationBuilder.DropIndex(
name: "IX_Vector3_EFACSnapshotSnapshotId",
table: "Vector3");
migrationBuilder.DropColumn(
name: "Fraction",
table: "EFClientKills");
migrationBuilder.DropColumn(
name: "IsKill",
table: "EFClientKills");
}
}
}