using Microsoft.EntityFrameworkCore.Migrations;

namespace Sledgemapper.Api.Migrations
{
    public partial class uniquesessionindex : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_Sessions_CampaignId",
                table: "Sessions");

            migrationBuilder.CreateIndex(
                name: "IX_Sessions_CampaignId_SessionId",
                table: "Sessions",
                columns: new[] { "CampaignId", "SessionId" },
                unique: true);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_Sessions_CampaignId_SessionId",
                table: "Sessions");

            migrationBuilder.CreateIndex(
                name: "IX_Sessions_CampaignId",
                table: "Sessions",
                column: "CampaignId");
        }
    }
}
