using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace OmsorgCore.Infrastructure.Persistence.Migrations
{
    /// <inheritdoc />
    public partial class SplitFacilityAddressFields : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Address",
                table: "facilities");

            migrationBuilder.DropColumn(
                name: "BillingAddress",
                table: "facilities");

            migrationBuilder.AddColumn<string>(
                name: "BillingCity",
                table: "facilities",
                type: "character varying(100)",
                maxLength: 100,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "BillingCountry",
                table: "facilities",
                type: "character varying(100)",
                maxLength: 100,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "BillingPostalCode",
                table: "facilities",
                type: "character varying(10)",
                maxLength: 10,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "BillingStreet",
                table: "facilities",
                type: "character varying(200)",
                maxLength: 200,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "City",
                table: "facilities",
                type: "character varying(100)",
                maxLength: 100,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Country",
                table: "facilities",
                type: "character varying(100)",
                maxLength: 100,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "PostalCode",
                table: "facilities",
                type: "character varying(10)",
                maxLength: 10,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "Street",
                table: "facilities",
                type: "character varying(200)",
                maxLength: 200,
                nullable: true);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "BillingCity",
                table: "facilities");

            migrationBuilder.DropColumn(
                name: "BillingCountry",
                table: "facilities");

            migrationBuilder.DropColumn(
                name: "BillingPostalCode",
                table: "facilities");

            migrationBuilder.DropColumn(
                name: "BillingStreet",
                table: "facilities");

            migrationBuilder.DropColumn(
                name: "City",
                table: "facilities");

            migrationBuilder.DropColumn(
                name: "Country",
                table: "facilities");

            migrationBuilder.DropColumn(
                name: "PostalCode",
                table: "facilities");

            migrationBuilder.DropColumn(
                name: "Street",
                table: "facilities");

            migrationBuilder.AddColumn<string>(
                name: "Address",
                table: "facilities",
                type: "character varying(300)",
                maxLength: 300,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "BillingAddress",
                table: "facilities",
                type: "character varying(300)",
                maxLength: 300,
                nullable: true);
        }
    }
}
