Created
May 27, 2020 08:13
-
-
Save joewashington75/d0fd16d8ee793fdb2e57a120b6b05b76 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 Microsoft.EntityFrameworkCore.Migrations; | |
namespace EFCoreSeparateProject.Migrations.Migrations | |
{ | |
public partial class InitialMigration : Migration | |
{ | |
protected override void Up(MigrationBuilder migrationBuilder) | |
{ | |
migrationBuilder.EnsureSchema( | |
name: "EfCore"); | |
migrationBuilder.CreateTable( | |
name: "Customers", | |
schema: "EfCore", | |
columns: table => new | |
{ | |
Id = table.Column<int>(nullable: false) | |
.Annotation("SqlServer:Identity", "1, 1"), | |
FirstName = table.Column<string>(nullable: true), | |
LastName = table.Column<string>(nullable: true), | |
AddressLine1 = table.Column<string>(nullable: true), | |
AddressLine2 = table.Column<string>(nullable: true), | |
Postcode = table.Column<string>(nullable: true) | |
}, | |
constraints: table => | |
{ | |
table.PrimaryKey("PK_Customers", x => x.Id); | |
}); | |
} | |
protected override void Down(MigrationBuilder migrationBuilder) | |
{ | |
migrationBuilder.DropTable( | |
name: "Customers", | |
schema: "EfCore"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment