2018-09-02 17:59:27 -04:00
|
|
|
|
using System;
|
2018-09-23 20:45:54 -04:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
2018-09-02 17:59:27 -04:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
2018-09-23 20:45:54 -04:00
|
|
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
2018-09-02 17:59:27 -04:00
|
|
|
|
|
2020-11-27 22:52:52 -05:00
|
|
|
|
namespace SharedLibraryCore.Migrations.Sqlite
|
2018-09-02 17:59:27 -04:00
|
|
|
|
{
|
|
|
|
|
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)
|
2018-09-23 20:45:54 -04:00
|
|
|
|
.Annotation("Sqlite:Autoincrement", true)
|
|
|
|
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
|
|
|
|
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
|
|
Active = table.Column<bool>(nullable: false),
|
2018-09-02 17:59:27 -04:00
|
|
|
|
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");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|