using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Govor.Domain.Migrations
{
///
public partial class ReliableChatPush : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ChatPushNotifications",
columns: table => new
{
MessageId = table.Column(type: "uuid", nullable: false),
NextAttemptAt = table.Column(type: "timestamp with time zone", nullable: false),
Attempts = table.Column(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ChatPushNotifications", x => x.MessageId);
table.ForeignKey(
name: "FK_ChatPushNotifications_Messages_MessageId",
column: x => x.MessageId,
principalTable: "Messages",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_ChatPushNotifications_NextAttemptAt",
table: "ChatPushNotifications",
column: "NextAttemptAt");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ChatPushNotifications");
}
}
}