using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DF.AppUsage.Api.Migrations
{
    /// <inheritdoc />
    public partial class AddExternalId : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "ExternalId",
                table: "InsightEntries",
                type: "text",
                nullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_InsightEntries_ExternalId",
                table: "InsightEntries",
                column: "ExternalId",
                unique: true);
        }

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

            migrationBuilder.DropColumn(
                name: "ExternalId",
                table: "InsightEntries");
        }
    }
}
