using Microsoft.EntityFrameworkCore.Migrations;
using CvSearch.Data;

#nullable disable

namespace CvSearch.Data.Migrations
{
    /// <inheritdoc />
    public partial class AddLanguageToJobSearchEntities : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "Language",
                schema: MigrationConstants.SchemaName,
                table: "JobSearchTokens",
                type: "nvarchar(8)",
                maxLength: 8,
                nullable: false,
                defaultValue: "en");

            migrationBuilder.AddColumn<string>(
                name: "Language",
                schema: MigrationConstants.SchemaName,
                table: "JobSearchSessions",
                type: "nvarchar(8)",
                maxLength: 8,
                nullable: false,
                defaultValue: "en");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Language",
                schema: MigrationConstants.SchemaName,
                table: "JobSearchTokens");

            migrationBuilder.DropColumn(
                name: "Language",
                schema: MigrationConstants.SchemaName,
                table: "JobSearchSessions");
        }
    }
}
