First Initial
This commit is contained in:
44
Migrations/25630118135100_NewCreteEvaColumn.cs
Normal file
44
Migrations/25630118135100_NewCreteEvaColumn.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class NewCreteEvaColumn : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "evaluation_group_id",
|
||||
table: "eva_create_evaluation",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_eva_create_evaluation_evaluation_group_id",
|
||||
table: "eva_create_evaluation",
|
||||
column: "evaluation_group_id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_eva_create_evaluation_eva_evaluation_group_evaluation_group~",
|
||||
table: "eva_create_evaluation",
|
||||
column: "evaluation_group_id",
|
||||
principalTable: "eva_evaluation_group",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_eva_create_evaluation_eva_evaluation_group_evaluation_group~",
|
||||
table: "eva_create_evaluation");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_eva_create_evaluation_evaluation_group_id",
|
||||
table: "eva_create_evaluation");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "evaluation_group_id",
|
||||
table: "eva_create_evaluation");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user