using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace pavesys_iRAP.Migrations
{
    /// <inheritdoc />
    public partial class AddIsMphProjects : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "externalUrl",
                schema: "dbo",
                table: "project",
                type: "nvarchar(max)",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "nvarchar(max)");

            migrationBuilder.AddColumn<bool>(
                name: "isMph",
                schema: "dbo",
                table: "project",
                type: "bit",
                nullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "landmark",
                schema: "dbo",
                table: "coding",
                type: "nvarchar(max)",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "nvarchar(max)");

            migrationBuilder.AlterColumn<string>(
                name: "comments",
                schema: "dbo",
                table: "coding",
                type: "nvarchar(max)",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "nvarchar(max)");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "isMph",
                schema: "dbo",
                table: "project");

            migrationBuilder.AlterColumn<string>(
                name: "externalUrl",
                schema: "dbo",
                table: "project",
                type: "nvarchar(max)",
                nullable: false,
                defaultValue: "",
                oldClrType: typeof(string),
                oldType: "nvarchar(max)",
                oldNullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "landmark",
                schema: "dbo",
                table: "coding",
                type: "nvarchar(max)",
                nullable: false,
                defaultValue: "",
                oldClrType: typeof(string),
                oldType: "nvarchar(max)",
                oldNullable: true);

            migrationBuilder.AlterColumn<string>(
                name: "comments",
                schema: "dbo",
                table: "coding",
                type: "nvarchar(max)",
                nullable: false,
                defaultValue: "",
                oldClrType: typeof(string),
                oldType: "nvarchar(max)",
                oldNullable: true);
        }
    }
}
