using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Nexus.Api.Migrations
{
///
public partial class AddNotifications : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Notifications",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
Type = table.Column(type: "character varying(60)", maxLength: 60, nullable: false),
Title = table.Column(type: "character varying(240)", maxLength: 240, nullable: false),
Message = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true),
ForUser = table.Column(type: "character varying(60)", maxLength: 60, nullable: false),
TaskId = table.Column(type: "uuid", nullable: true),
IsRead = table.Column(type: "boolean", nullable: false),
CreatedAt = table.Column(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Notifications", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_Notifications_ForUser_IsRead_CreatedAt",
table: "Notifications",
columns: new[] { "ForUser", "IsRead", "CreatedAt" });
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Notifications");
}
}
}