using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PARR.DAL.Migrations
{
    /// <inheritdoc />
    public partial class TblAIHEKFixDatatype : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "SysModTime",
                schema: "AIHIT",
                table: "RawDataEKs",
                type: "text",
                nullable: true,
                oldClrType: typeof(DateTime),
                oldType: "timestamp with time zone",
                oldNullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "StartExplotationDate",
                schema: "AIHIT",
                table: "RawDataEKs",
                type: "text",
                nullable: true,
                oldClrType: typeof(DateTime),
                oldType: "timestamp with time zone",
                oldNullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "PlannedTimeToRepair",
                schema: "AIHIT",
                table: "RawDataEKs",
                type: "text",
                nullable: true,
                oldClrType: typeof(DateTime),
                oldType: "timestamp with time zone",
                oldNullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "EndExplotationDate",
                schema: "AIHIT",
                table: "RawDataEKs",
                type: "text",
                nullable: true,
                oldClrType: typeof(DateTime),
                oldType: "timestamp with time zone",
                oldNullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "CreateTime",
                schema: "AIHIT",
                table: "RawDataEKs",
                type: "text",
                nullable: true,
                oldClrType: typeof(DateTime),
                oldType: "timestamp with time zone",
                oldNullable: true);

            migrationBuilder.UpdateData(
                schema: "AIHIT",
                table: "Settings",
                keyColumn: "Id",
                keyValue: new Guid("50f66704-4d26-4587-bb1e-dca70c8f4b89"),
                column: "Value",
                value: "94-ЗАБ");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<DateTime>(
                name: "SysModTime",
                schema: "AIHIT",
                table: "RawDataEKs",
                type: "timestamp with time zone",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "text",
                oldNullable: true);

            migrationBuilder.AlterColumn<DateTime>(
                name: "StartExplotationDate",
                schema: "AIHIT",
                table: "RawDataEKs",
                type: "timestamp with time zone",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "text",
                oldNullable: true);

            migrationBuilder.AlterColumn<DateTime>(
                name: "PlannedTimeToRepair",
                schema: "AIHIT",
                table: "RawDataEKs",
                type: "timestamp with time zone",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "text",
                oldNullable: true);

            migrationBuilder.AlterColumn<DateTime>(
                name: "EndExplotationDate",
                schema: "AIHIT",
                table: "RawDataEKs",
                type: "timestamp with time zone",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "text",
                oldNullable: true);

            migrationBuilder.AlterColumn<DateTime>(
                name: "CreateTime",
                schema: "AIHIT",
                table: "RawDataEKs",
                type: "timestamp with time zone",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "text",
                oldNullable: true);

            migrationBuilder.UpdateData(
                schema: "AIHIT",
                table: "Settings",
                keyColumn: "Id",
                keyValue: new Guid("50f66704-4d26-4587-bb1e-dca70c8f4b89"),
                column: "Value",
                value: "94 - ЗАБ");
        }
    }
}
