41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace Infrastructure.Migrations
|
|
{
|
|
public partial class AlterLinkVotesPK : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropPrimaryKey(
|
|
name: "PK_link_votes",
|
|
table: "link_votes");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_link_votes_LinkId",
|
|
table: "link_votes");
|
|
|
|
migrationBuilder.AddPrimaryKey(
|
|
name: "PK_link_votes",
|
|
table: "link_votes",
|
|
columns: new[] { "LinkId", "Id" });
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropPrimaryKey(
|
|
name: "PK_link_votes",
|
|
table: "link_votes");
|
|
|
|
migrationBuilder.AddPrimaryKey(
|
|
name: "PK_link_votes",
|
|
table: "link_votes",
|
|
column: "Id");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_link_votes_LinkId",
|
|
table: "link_votes",
|
|
column: "LinkId");
|
|
}
|
|
}
|
|
}
|