using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional

namespace TechHelper.Server.Migrations
{
    /// <inheritdoc />
    public partial class updedd : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: new Guid("c0f247ab-b12a-432e-8ce7-d0e28811957e"));

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: new Guid("f282e759-deb5-4366-aaf1-51366131cf75"));

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: new Guid("f9eeea07-eeda-4bbe-a2e4-6aef2f3c7c9a"));

            migrationBuilder.AddColumn<Guid>(
                name: "AssignmentId",
                table: "assignment_questions",
                type: "char(36)",
                nullable: true,
                collation: "ascii_general_ci");

            migrationBuilder.InsertData(
                table: "AspNetRoles",
                columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
                values: new object[,]
                {
                    { new Guid("cf16c215-63f8-4962-8ad0-058274ecf944"), null, "Administrator", "ADMINISTRATOR" },
                    { new Guid("e3bff43c-36af-497a-971c-ed0a487bdd38"), null, "Student", "STUDENT" },
                    { new Guid("f05c125e-e70f-40eb-9e19-6e69c3426849"), null, "Teacher", "TEACHER" }
                });

            migrationBuilder.CreateIndex(
                name: "IX_assignment_questions_AssignmentId",
                table: "assignment_questions",
                column: "AssignmentId");

            migrationBuilder.AddForeignKey(
                name: "FK_assignment_questions_assignments_AssignmentId",
                table: "assignment_questions",
                column: "AssignmentId",
                principalTable: "assignments",
                principalColumn: "id");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_assignment_questions_assignments_AssignmentId",
                table: "assignment_questions");

            migrationBuilder.DropIndex(
                name: "IX_assignment_questions_AssignmentId",
                table: "assignment_questions");

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: new Guid("cf16c215-63f8-4962-8ad0-058274ecf944"));

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: new Guid("e3bff43c-36af-497a-971c-ed0a487bdd38"));

            migrationBuilder.DeleteData(
                table: "AspNetRoles",
                keyColumn: "Id",
                keyValue: new Guid("f05c125e-e70f-40eb-9e19-6e69c3426849"));

            migrationBuilder.DropColumn(
                name: "AssignmentId",
                table: "assignment_questions");

            migrationBuilder.InsertData(
                table: "AspNetRoles",
                columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
                values: new object[,]
                {
                    { new Guid("c0f247ab-b12a-432e-8ce7-d0e28811957e"), null, "Student", "STUDENT" },
                    { new Guid("f282e759-deb5-4366-aaf1-51366131cf75"), null, "Administrator", "ADMINISTRATOR" },
                    { new Guid("f9eeea07-eeda-4bbe-a2e4-6aef2f3c7c9a"), null, "Teacher", "TEACHER" }
                });
        }
    }
}
