提交
This commit is contained in:
@@ -1,41 +1,41 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IM_API.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updateconversationlastreadmessageid : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "conversations_ibfk_2",
|
||||
table: "conversations");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "conversations_ibfk_2",
|
||||
table: "conversations",
|
||||
column: "lastReadMessageId",
|
||||
principalTable: "messages",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.SetNull);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "conversations_ibfk_2",
|
||||
table: "conversations");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "conversations_ibfk_2",
|
||||
table: "conversations",
|
||||
column: "lastReadMessageId",
|
||||
principalTable: "messages",
|
||||
principalColumn: "ID");
|
||||
}
|
||||
}
|
||||
}
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IM_API.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updateconversationlastreadmessageid : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "conversations_ibfk_2",
|
||||
table: "conversations");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "conversations_ibfk_2",
|
||||
table: "conversations",
|
||||
column: "lastReadMessageId",
|
||||
principalTable: "messages",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.SetNull);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "conversations_ibfk_2",
|
||||
table: "conversations");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "conversations_ibfk_2",
|
||||
table: "conversations",
|
||||
column: "lastReadMessageId",
|
||||
principalTable: "messages",
|
||||
principalColumn: "ID");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user