46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
|
|
using System;
|
|||
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|
|||
|
|
namespace APT.Data.Migrations.Migrations
|
|||
|
|
{
|
|||
|
|
public partial class wyw2025070201 : Migration
|
|||
|
|
{
|
|||
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
|
{
|
|||
|
|
migrationBuilder.AddColumn<Guid>(
|
|||
|
|
name: "IMG_FILE_ID",
|
|||
|
|
table: "T_PF_FILE_DB",
|
|||
|
|
type: "uniqueidentifier",
|
|||
|
|
nullable: true);
|
|||
|
|
|
|||
|
|
migrationBuilder.CreateIndex(
|
|||
|
|
name: "IX_T_PF_FILE_DB_IMG_FILE_ID",
|
|||
|
|
table: "T_PF_FILE_DB",
|
|||
|
|
column: "IMG_FILE_ID");
|
|||
|
|
|
|||
|
|
migrationBuilder.AddForeignKey(
|
|||
|
|
name: "FK_T_PF_FILE_DB_T_PF_IMG_FILE_IMG_FILE_ID",
|
|||
|
|
table: "T_PF_FILE_DB",
|
|||
|
|
column: "IMG_FILE_ID",
|
|||
|
|
principalTable: "T_PF_IMG_FILE",
|
|||
|
|
principalColumn: "ID",
|
|||
|
|
onDelete: ReferentialAction.Restrict);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
|
{
|
|||
|
|
migrationBuilder.DropForeignKey(
|
|||
|
|
name: "FK_T_PF_FILE_DB_T_PF_IMG_FILE_IMG_FILE_ID",
|
|||
|
|
table: "T_PF_FILE_DB");
|
|||
|
|
|
|||
|
|
migrationBuilder.DropIndex(
|
|||
|
|
name: "IX_T_PF_FILE_DB_IMG_FILE_ID",
|
|||
|
|
table: "T_PF_FILE_DB");
|
|||
|
|
|
|||
|
|
migrationBuilder.DropColumn(
|
|||
|
|
name: "IMG_FILE_ID",
|
|||
|
|
table: "T_PF_FILE_DB");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|