using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace FiscalOS.Infra.Migrations
{
  /// <inheritdoc />
  public partial class AddIndexesWithUniquenessToModels : Migration
  {
    /// <inheritdoc />
    protected override void Up(MigrationBuilder migrationBuilder)
    {
      migrationBuilder.CreateIndex(
          name: "IX_Users_Username",
          table: "Users",
          column: "Username",
          unique: true);

      migrationBuilder.CreateIndex(
          name: "IX_RefreshTokens_Token",
          table: "RefreshTokens",
          column: "Token",
          unique: true);
    }

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

      migrationBuilder.DropIndex(
          name: "IX_RefreshTokens_Token",
          table: "RefreshTokens");
    }
  }
}