using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Knot.Modules.Chats.Migrations
{
///
public partial class AddHighWaterMark : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "LastMessageSequenceId",
schema: "chats",
table: "Chats",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.AddColumn(
name: "LastDeliveredMessageId",
schema: "chats",
table: "ChatMembers",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "LastReadMessageId",
schema: "chats",
table: "ChatMembers",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn(
name: "LastReadSequenceId",
schema: "chats",
table: "ChatMembers",
type: "bigint",
nullable: false,
defaultValue: 0L);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastMessageSequenceId",
schema: "chats",
table: "Chats");
migrationBuilder.DropColumn(
name: "LastDeliveredMessageId",
schema: "chats",
table: "ChatMembers");
migrationBuilder.DropColumn(
name: "LastReadMessageId",
schema: "chats",
table: "ChatMembers");
migrationBuilder.DropColumn(
name: "LastReadSequenceId",
schema: "chats",
table: "ChatMembers");
}
}
}