using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
///
public partial class SystemDocumentAttachment1 : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "SystemDocumentAttachment",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
SystemDocumentId = table.Column(type: "uniqueidentifier", nullable: false),
FileName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
OffLine = table.Column(type: "bit", nullable: false),
FilePath = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
FileSize = table.Column(type: "decimal(18,2)", precision: 18, scale: 2, nullable: true),
FileFormat = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false),
UpdateUserId = table.Column(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_SystemDocumentAttachment", x => x.Id);
table.ForeignKey(
name: "FK_SystemDocumentAttachment_User_CreateUserId",
column: x => x.CreateUserId,
principalTable: "User",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "后台 - 系统签署文档附件");
migrationBuilder.CreateIndex(
name: "IX_SystemDocumentAttachment_CreateUserId",
table: "SystemDocumentAttachment",
column: "CreateUserId");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "SystemDocumentAttachment");
}
}
}