52 lines
1.7 KiB
C#
52 lines
1.7 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class fimeNmae : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Name",
|
|
table: "SystemDocumentAttachment",
|
|
type: "nvarchar(400)",
|
|
maxLength: 400,
|
|
nullable: false,
|
|
defaultValue: "");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_SystemDocumentAttachment_SystemDocumentId",
|
|
table: "SystemDocumentAttachment",
|
|
column: "SystemDocumentId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_SystemDocumentAttachment_SystemDocument_SystemDocumentId",
|
|
table: "SystemDocumentAttachment",
|
|
column: "SystemDocumentId",
|
|
principalTable: "SystemDocument",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_SystemDocumentAttachment_SystemDocument_SystemDocumentId",
|
|
table: "SystemDocumentAttachment");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_SystemDocumentAttachment_SystemDocumentId",
|
|
table: "SystemDocumentAttachment");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Name",
|
|
table: "SystemDocumentAttachment");
|
|
}
|
|
}
|
|
}
|