using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace JobsMedical.Web.Migrations
{
    /// <inheritdoc />
    public partial class IngestionFields : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "Confidence",
                table: "RawListings",
                type: "integer",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "ContentHash",
                table: "RawListings",
                type: "character varying(64)",
                maxLength: 64,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ValidationNotes",
                table: "RawListings",
                type: "character varying(1000)",
                maxLength: 1000,
                nullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_RawListings_ContentHash",
                table: "RawListings",
                column: "ContentHash");

            migrationBuilder.CreateIndex(
                name: "IX_RawListings_Status",
                table: "RawListings",
                column: "Status");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "IX_RawListings_ContentHash",
                table: "RawListings");

            migrationBuilder.DropIndex(
                name: "IX_RawListings_Status",
                table: "RawListings");

            migrationBuilder.DropColumn(
                name: "Confidence",
                table: "RawListings");

            migrationBuilder.DropColumn(
                name: "ContentHash",
                table: "RawListings");

            migrationBuilder.DropColumn(
                name: "ValidationNotes",
                table: "RawListings");
        }
    }
}
