52 lines
2.0 KiB
C#
52 lines
2.0 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class EmailReSendLog : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "EmailReSendLog",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
MainMailMessageId = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
|
|
ReMailMessageId = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
|
|
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
|
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_EmailReSendLog", x => x.Id);
|
|
table.ForeignKey(
|
|
name: "FK_EmailReSendLog_User_CreateUserId",
|
|
column: x => x.CreateUserId,
|
|
principalTable: "User",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
},
|
|
comment: "邮件重发日志");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_EmailReSendLog_CreateUserId",
|
|
table: "EmailReSendLog",
|
|
column: "CreateUserId");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "EmailReSendLog");
|
|
}
|
|
}
|
|
}
|