using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Managing.Infrastructure.Databases.Migrations
{
    /// <inheritdoc />
    public partial class AddInitiatorIdentifierToPositions : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_Positions_Date",
                table: "Positions");

            migrationBuilder.AddColumn<Guid>(
                name: "InitiatorIdentifier",
                table: "Positions",
                type: "uuid",
                nullable: false,
                defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));

            migrationBuilder.CreateIndex(
                name: "IX_Positions_InitiatorIdentifier",
                table: "Positions",
                column: "InitiatorIdentifier");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_Positions_InitiatorIdentifier",
                table: "Positions");

            migrationBuilder.DropColumn(
                name: "InitiatorIdentifier",
                table: "Positions");

            migrationBuilder.CreateIndex(
                name: "IX_Positions_Date",
                table: "Positions",
                column: "Date");
        }
    }
}
