47 lines
1.7 KiB
C#
47 lines
1.7 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Hcs.WebApp.Data.Hcs.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddFileToParseEntity : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "FilesToParse",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
Path = table.Column<int>(type: "int", nullable: false),
|
|
ParsedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|
LastParseOperationId = table.Column<int>(type: "int", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_FilesToParse", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_FilesToParse_Operations_LastParseOperationId",
|
|
column: x => x.LastParseOperationId,
|
|
principalTable: "Operations",
|
|
principalColumn: "Id");
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_FilesToParse_LastParseOperationId",
|
|
table: "FilesToParse",
|
|
column: "LastParseOperationId");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "FilesToParse");
|
|
}
|
|
}
|
|
}
|