Created
May 5, 2019 15:49
-
-
Save nishanc/e3d04415bf598d873b2fade8546f7b0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.EntityFrameworkCore.Metadata; | |
using Microsoft.EntityFrameworkCore.Migrations; | |
namespace JWTAuth.API.Migrations | |
{ | |
public partial class AddedUserModel : Migration | |
{ | |
protected override void Up(MigrationBuilder migrationBuilder) | |
{ | |
migrationBuilder.CreateTable( | |
name: "Users", | |
columns: table => new | |
{ | |
Id = table.Column<int>(nullable: false) | |
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), | |
Username = table.Column<string>(nullable: true), | |
PasswordHash = table.Column<byte[]>(nullable: true), | |
PasswordSalt = table.Column<byte[]>(nullable: true) | |
}, | |
constraints: table => | |
{ | |
table.PrimaryKey("PK_Users", x => x.Id); | |
}); | |
} | |
protected override void Down(MigrationBuilder migrationBuilder) | |
{ | |
migrationBuilder.DropTable( | |
name: "Users"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment