45 lines
1.6 KiB
C#
45 lines
1.6 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace tb320eva.Migrations
|
|
{
|
|
public partial class AddLimitFrameGroupColumn : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "limit_frame_group_id",
|
|
table: "eva_limit_frame_employee",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_eva_limit_frame_employee_limit_frame_group_id",
|
|
table: "eva_limit_frame_employee",
|
|
column: "limit_frame_group_id");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_eva_limit_frame_employee_eva_limit_frame_group_limit_frame_~",
|
|
table: "eva_limit_frame_employee",
|
|
column: "limit_frame_group_id",
|
|
principalTable: "eva_limit_frame_group",
|
|
principalColumn: "id",
|
|
onDelete: ReferentialAction.Restrict);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_eva_limit_frame_employee_eva_limit_frame_group_limit_frame_~",
|
|
table: "eva_limit_frame_employee");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_eva_limit_frame_employee_limit_frame_group_id",
|
|
table: "eva_limit_frame_employee");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "limit_frame_group_id",
|
|
table: "eva_limit_frame_employee");
|
|
}
|
|
}
|
|
}
|