using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace bitforum.Migrations.DefaultDb
{
    /// <inheritdoc />
    public partial class UpdateFields : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "IsDisplay",
                table: "Document",
                newName: "IsActive");

            migrationBuilder.CreateIndex(
                name: "IX_Document_IsActive",
                table: "Document",
                column: "IsActive",
                unique: true);
        }

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

            migrationBuilder.RenameColumn(
                name: "IsActive",
                table: "Document",
                newName: "IsDisplay");
        }
    }
}
