using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Govor.Data.Migrations
{
///
public partial class FixRecipientIndex : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_PrivateChats_Id",
table: "PrivateChats");
migrationBuilder.DropIndex(
name: "IX_Messages_Id",
table: "Messages");
migrationBuilder.DropIndex(
name: "IX_Messages_RecipientId",
table: "Messages");
migrationBuilder.DropIndex(
name: "IX_Friendships_Id",
table: "Friendships");
migrationBuilder.CreateIndex(
name: "IX_Messages_RecipientId",
table: "Messages",
column: "RecipientId");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_Messages_RecipientId",
table: "Messages");
migrationBuilder.CreateIndex(
name: "IX_PrivateChats_Id",
table: "PrivateChats",
column: "Id",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Messages_Id",
table: "Messages",
column: "Id",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Messages_RecipientId",
table: "Messages",
column: "RecipientId",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Friendships_Id",
table: "Friendships",
column: "Id",
unique: true);
}
}
}