using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace GestorFacturas.API.Migrations { /// public partial class AgregaAutenticacion : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Usuarios", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), Username = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false), PasswordHash = table.Column(type: "nvarchar(max)", nullable: false), Nombre = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Usuarios", x => x.Id); }); migrationBuilder.InsertData( table: "Usuarios", columns: new[] { "Id", "Nombre", "PasswordHash", "Username" }, values: new object[] { 1, "Administrador", "$2a$11$Z5.Cg.y.u.e.t.c.h.a.n.g.e.m.e", "admin" }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Usuarios"); } } }