ปรับปรุงให้แนบไฟล์ ผลสัมฤทธิ์ของงาน ได้หลายไฟล์
This commit is contained in:
44
Migrations/20210411122053_AddAttach.cs
Normal file
44
Migrations/20210411122053_AddAttach.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class AddAttach : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "eva_evaluation_achievement_attach",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(nullable: false),
|
||||
created = table.Column<DateTime>(nullable: false),
|
||||
updated = table.Column<DateTime>(nullable: false),
|
||||
isActive = table.Column<bool>(nullable: false),
|
||||
achievement_id = table.Column<int>(nullable: true),
|
||||
the_file = table.Column<string>(maxLength: 1000, nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_eva_evaluation_achievement_attach", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_eva_evaluation_achievement_attach_eva_evaluation_achievemen~",
|
||||
column: x => x.achievement_id,
|
||||
principalTable: "eva_evaluation_achievement",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_evaluation_achievement_attach_achievement_id",
|
||||
table: "eva_evaluation_achievement_attach",
|
||||
column: "achievement_id");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "eva_evaluation_achievement_attach");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user