manager-service/ManagerService/Migrations/20260316114312_AddPushNotifications.cs
2026-03-17 09:10:56 +01:00

48 lines
1.9 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ManagerService.Migrations
{
/// <inheritdoc />
public partial class AddPushNotifications : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PushNotifications",
columns: table => new
{
Id = table.Column<string>(type: "text", nullable: false),
InstanceId = table.Column<string>(type: "text", nullable: false),
Title = table.Column<string>(type: "text", nullable: false),
Body = table.Column<string>(type: "text", nullable: false),
Topic = table.Column<string>(type: "text", nullable: false),
Status = table.Column<int>(type: "integer", nullable: false),
ScheduledAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
SentAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
HangfireJobId = table.Column<string>(type: "text", nullable: true),
DateCreation = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_PushNotifications", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_PushNotifications_InstanceId",
table: "PushNotifications",
column: "InstanceId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PushNotifications");
}
}
}