using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Backend.Migrations
{
    /// <inheritdoc />
    public partial class AddClipReviewWorkflow : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.Sql(
                """
                ALTER TABLE IF EXISTS "ClipSubmissions"
                ADD COLUMN IF NOT EXISTS "ReviewNote" character varying(500) NULL;

                ALTER TABLE IF EXISTS "ClipSubmissions"
                ADD COLUMN IF NOT EXISTS "ReviewedByTwitchId" character varying(120) NULL;

                ALTER TABLE IF EXISTS "ClipSubmissions"
                ADD COLUMN IF NOT EXISTS "ReviewedAt" timestamp with time zone NULL;
                """);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.Sql(
                """
                ALTER TABLE IF EXISTS "ClipSubmissions"
                DROP COLUMN IF EXISTS "ReviewNote";

                ALTER TABLE IF EXISTS "ClipSubmissions"
                DROP COLUMN IF EXISTS "ReviewedByTwitchId";

                ALTER TABLE IF EXISTS "ClipSubmissions"
                DROP COLUMN IF EXISTS "ReviewedAt";
                """);
        }
    }
}
