Add FileToParse entity

This commit is contained in:
2025-11-17 16:15:31 +09:00
parent d2d9432687
commit 1be00766ec
6 changed files with 392 additions and 1 deletions

View File

@ -0,0 +1,46 @@
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");
}
}
}