-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
236 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
OdeToFoodRider/OdeToFoodRider/Migrations/20180706131502_InitialCreate.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
OdeToFoodRider/OdeToFoodRider/Migrations/20180706131502_InitialCreate.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace OdeToFoodRider.Migrations | ||
{ | ||
public partial class InitialCreate : Migration | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Restaurants", | ||
columns: table => new | ||
{ | ||
Id = table.Column<int>(nullable: false) | ||
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), | ||
Cuisine = table.Column<int>(nullable: false), | ||
Name = table.Column<string>(maxLength: 80, nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Restaurants", x => x.Id); | ||
}); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Restaurants"); | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
OdeToFoodRider/OdeToFoodRider/Migrations/OdeToFoodDbContextModelSnapshot.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// <auto-generated /> | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
using Microsoft.EntityFrameworkCore.Storage; | ||
using Microsoft.EntityFrameworkCore.Storage.Internal; | ||
using OdeToFoodRider.Data; | ||
using OdeToFoodRider.Models; | ||
using System; | ||
|
||
namespace OdeToFoodRider.Migrations | ||
{ | ||
[DbContext(typeof(OdeToFoodDbContext))] | ||
partial class OdeToFoodDbContextModelSnapshot : ModelSnapshot | ||
{ | ||
protected override void BuildModel(ModelBuilder modelBuilder) | ||
{ | ||
#pragma warning disable 612, 618 | ||
modelBuilder | ||
.HasAnnotation("ProductVersion", "2.0.3-rtm-10026") | ||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | ||
|
||
modelBuilder.Entity("OdeToFoodRider.Models.Restaurant", b => | ||
{ | ||
b.Property<int>("Id") | ||
.ValueGeneratedOnAdd(); | ||
b.Property<int>("Cuisine"); | ||
b.Property<string>("Name") | ||
.IsRequired() | ||
.HasMaxLength(80); | ||
b.HasKey("Id"); | ||
b.ToTable("Restaurants"); | ||
}); | ||
#pragma warning restore 612, 618 | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
...oodVisualStudio/OdeToFoodVisualStudio/Migrations/20180706130949_InitialCreate.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
OdeToFoodVisualStudio/OdeToFoodVisualStudio/Migrations/20180706130949_InitialCreate.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace OdeToFoodVisualStudio.Migrations | ||
{ | ||
public partial class InitialCreate : Migration | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Restaurants", | ||
columns: table => new | ||
{ | ||
Id = table.Column<int>(nullable: false) | ||
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), | ||
Cuisine = table.Column<int>(nullable: false), | ||
Name = table.Column<string>(maxLength: 80, nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Restaurants", x => x.Id); | ||
}); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "Restaurants"); | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
OdeToFoodVisualStudio/OdeToFoodVisualStudio/Migrations/OdeToFoodDbContextModelSnapshot.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// <auto-generated /> | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
using Microsoft.EntityFrameworkCore.Metadata; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
using Microsoft.EntityFrameworkCore.Storage; | ||
using Microsoft.EntityFrameworkCore.Storage.Internal; | ||
using OdeToFoodVisualStudio.Data; | ||
using OdeToFoodVisualStudio.Models; | ||
using System; | ||
|
||
namespace OdeToFoodVisualStudio.Migrations | ||
{ | ||
[DbContext(typeof(OdeToFoodDbContext))] | ||
partial class OdeToFoodDbContextModelSnapshot : ModelSnapshot | ||
{ | ||
protected override void BuildModel(ModelBuilder modelBuilder) | ||
{ | ||
#pragma warning disable 612, 618 | ||
modelBuilder | ||
.HasAnnotation("ProductVersion", "2.0.3-rtm-10026") | ||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | ||
|
||
modelBuilder.Entity("OdeToFoodVisualStudio.Models.Restaurant", b => | ||
{ | ||
b.Property<int>("Id") | ||
.ValueGeneratedOnAdd(); | ||
b.Property<int>("Cuisine"); | ||
b.Property<string>("Name") | ||
.IsRequired() | ||
.HasMaxLength(80); | ||
b.HasKey("Id"); | ||
b.ToTable("Restaurants"); | ||
}); | ||
#pragma warning restore 612, 618 | ||
} | ||
} | ||
} |