using Microsoft.EntityFrameworkCore.Migrations;
using MyAi.Data;

#nullable disable

namespace MyAi.Data.Migrations
{
    /// <inheritdoc />
    public partial class DeleteMigratedTemplates : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.Sql($"DELETE FROM [{MigrationConstants.SchemaName}].[Templates] WHERE [Key] LIKE 'email.%'");
            migrationBuilder.Sql($"DELETE FROM [{MigrationConstants.SchemaName}].[Templates] WHERE [Key] LIKE 'ai.%'");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            // Rows were migrated to emailApi.EmailTemplates and cvMatcher.AiPrompts.
            // Re-inserting them here is intentionally omitted.
        }
    }
}
