mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 19:54:55 +00:00
68 lines
1.9 KiB
C#
68 lines
1.9 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Govor.Data.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class FixRecipientIndex : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
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");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
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);
|
|
}
|
|
}
|
|
}
|