Files
StandManager/StandManager.Infrastructure/Migrations/20260109133732_MailQueue.cs
2026-01-12 08:49:18 +01:00

66 lines
2.8 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace StandManager.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class MailQueue : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "MailQueue",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Subject = table.Column<string>(type: "nvarchar(max)", nullable: false),
Body = table.Column<string>(type: "nvarchar(max)", nullable: false),
ToList = table.Column<string>(type: "nvarchar(max)", nullable: false),
Args = table.Column<string>(type: "nvarchar(max)", nullable: true),
From = table.Column<int>(type: "int", nullable: false),
Sent = table.Column<bool>(type: "bit", nullable: false),
Error = table.Column<string>(type: "nvarchar(max)", nullable: true),
DataCreazione = table.Column<DateTime>(type: "datetime2", nullable: false),
DataModifica = table.Column<DateTime>(type: "datetime2", nullable: true),
Eliminato = table.Column<bool>(type: "bit", nullable: false),
IdUtenteCreazione = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IdUtenteModifica = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_MailQueue", x => x.Id);
table.ForeignKey(
name: "FK_MailQueue_Utente_IdUtenteCreazione",
column: x => x.IdUtenteCreazione,
principalTable: "Utente",
principalColumn: "Id");
table.ForeignKey(
name: "FK_MailQueue_Utente_IdUtenteModifica",
column: x => x.IdUtenteModifica,
principalTable: "Utente",
principalColumn: "Id");
});
migrationBuilder.CreateIndex(
name: "IX_MailQueue_IdUtenteCreazione",
table: "MailQueue",
column: "IdUtenteCreazione");
migrationBuilder.CreateIndex(
name: "IX_MailQueue_IdUtenteModifica",
table: "MailQueue",
column: "IdUtenteModifica");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "MailQueue");
}
}
}