Files
Bewerbungs-Portfolio/RazorPagesMovie/Migrations/20260818134749_AddNotificationSentToContactMessage.cs
T
2026-08-18 16:46:57 +02:00

50 lines
1.5 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace RazorPagesMovie.Migrations
{
/// <inheritdoc />
public partial class AddNotificationSentToContactMessage : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Message",
table: "ContactMessage",
type: "nvarchar(max)",
maxLength: 5000,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(4000)",
oldMaxLength: 4000);
migrationBuilder.AddColumn<bool>(
name: "NotificationSent",
table: "ContactMessage",
type: "bit",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "NotificationSent",
table: "ContactMessage");
migrationBuilder.AlterColumn<string>(
name: "Message",
table: "ContactMessage",
type: "nvarchar(4000)",
maxLength: 4000,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldMaxLength: 5000);
}
}
}