Архитектура
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Knot.Modules.Chats.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddHighWaterMark : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "LastMessageSequenceId",
|
||||
schema: "chats",
|
||||
table: "Chats",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "LastDeliveredMessageId",
|
||||
schema: "chats",
|
||||
table: "ChatMembers",
|
||||
type: "uuid",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "LastReadMessageId",
|
||||
schema: "chats",
|
||||
table: "ChatMembers",
|
||||
type: "uuid",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "LastReadSequenceId",
|
||||
schema: "chats",
|
||||
table: "ChatMembers",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user