using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace GerbilManagerWebAPI.Migrations
{
    /// <inheritdoc />
    public partial class AddFeedbackStatus : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<DateTimeOffset>(
                name: "ResolvedAt",
                table: "Feedback",
                type: "timestamp with time zone",
                nullable: true);

            // Existing feedback rows default to "Open" (the lifecycle's initial state).
            migrationBuilder.AddColumn<string>(
                name: "Status",
                table: "Feedback",
                type: "text",
                nullable: false,
                defaultValue: "Open");
        }

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

            migrationBuilder.DropColumn(
                name: "Status",
                table: "Feedback");
        }
    }
}
