using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DiunaBI.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class RemoveQueueJobDuplicateUTCFields : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CreatedAtUtc",
                table: "QueueJobs");

            migrationBuilder.DropColumn(
                name: "ModifiedAtUtc",
                table: "QueueJobs");

            migrationBuilder.AddColumn<DateTime>(
                name: "ModifiedAt",
                table: "QueueJobs",
                type: "datetime2",
                nullable: false,
                defaultValueSql: "GETUTCDATE()");
        }

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

            migrationBuilder.AddColumn<DateTime>(
                name: "CreatedAtUtc",
                table: "QueueJobs",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<DateTime>(
                name: "ModifiedAtUtc",
                table: "QueueJobs",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
        }
    }
}
