38 lines
1.3 KiB
C#
38 lines
1.3 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace ApiEfCoreLibrary.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class FixingDatabase : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Logins",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "int", nullable: false)
|
|
.Annotation("SqlServer:Identity", "1, 1"),
|
|
Username = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
|
FullName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
|
Password = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false),
|
|
Salt = table.Column<string>(type: "nvarchar(24)", maxLength: 24, nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Logins", x => x.Id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Logins");
|
|
}
|
|
}
|
|
}
|