using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Aberwyn.Migrations
{
    public partial class AddOrderToBudgetCategory : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Person",
                table: "BudgetItems");

            migrationBuilder.AddColumn<int>(
                name: "Order",
                table: "BudgetPeriods",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "Order",
                table: "BudgetItems",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "Order",
                table: "BudgetCategories",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Order",
                table: "BudgetPeriods");

            migrationBuilder.DropColumn(
                name: "Order",
                table: "BudgetItems");

            migrationBuilder.DropColumn(
                name: "Order",
                table: "BudgetCategories");

            migrationBuilder.AddColumn<string>(
                name: "Person",
                table: "BudgetItems",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");
        }
    }
}
