33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace Sledgemapper.Api.Migrations
|
|
{
|
|
public partial class uniquesessionnameindex : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Sessions_CampaignId_SessionId",
|
|
table: "Sessions");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Sessions_CampaignId_SessionName",
|
|
table: "Sessions",
|
|
columns: new[] { "CampaignId", "SessionName" },
|
|
unique: true);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Sessions_CampaignId_SessionName",
|
|
table: "Sessions");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Sessions_CampaignId_SessionId",
|
|
table: "Sessions",
|
|
columns: new[] { "CampaignId", "SessionId" },
|
|
unique: true);
|
|
}
|
|
}
|
|
}
|