using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace esuite.Database.SqlServer.Migrations
{
    /// <inheritdoc />
    public partial class SunriseDomainUpgrade : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "SunriseAppId",
                schema: "Domain",
                table: "Domains",
                type: "nvarchar(128)",
                maxLength: 128,
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "SunriseCategoryId",
                schema: "Domain",
                table: "Domains",
                type: "nvarchar(16)",
                maxLength: 16,
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "SunriseHostname",
                schema: "Domain",
                table: "Domains",
                type: "nvarchar(16)",
                maxLength: 16,
                nullable: false,
                defaultValue: "");

            migrationBuilder.UpdateData(
                schema: "Domain",
                table: "Domains",
                keyColumn: "Id",
                keyValue: 1L,
                columns: new[] { "SunriseAppId", "SunriseCategoryId", "SunriseHostname" },
                values: new object[] { "", "", "" });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "SunriseAppId",
                schema: "Domain",
                table: "Domains");

            migrationBuilder.DropColumn(
                name: "SunriseCategoryId",
                schema: "Domain",
                table: "Domains");

            migrationBuilder.DropColumn(
                name: "SunriseHostname",
                schema: "Domain",
                table: "Domains");
        }
    }
}
