Skip to content

Commit

Permalink
Add initial migration
Browse files Browse the repository at this point in the history
  • Loading branch information
gbdrm committed Jul 25, 2016
1 parent 7411eb4 commit 09b42dc
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Migrations/20160725063832_Initial.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions Migrations/20160725063832_Initial.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Metadata;

namespace HabraQuest.Migrations
{
public partial class Initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Players",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
Comment = table.Column<string>(nullable: true),
Name = table.Column<string>(nullable: true),
TaskNumber = table.Column<int>(nullable: false),
Token = table.Column<Guid>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Players", x => x.Id);
});
}

protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Players");
}
}
}
38 changes: 38 additions & 0 deletions Migrations/DataContextModelSnapshot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using HabraQuest.Model;

namespace HabraQuest.Migrations
{
[DbContext(typeof(DataContext))]
partial class DataContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
modelBuilder
.HasAnnotation("ProductVersion", "1.0.0-rtm-21431")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

modelBuilder.Entity("HabraQuest.Model.Player", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Comment");
b.Property<string>("Name");
b.Property<int>("TaskNumber");
b.Property<Guid>("Token");
b.HasKey("Id");
b.ToTable("Players");
});
}
}
}

0 comments on commit 09b42dc

Please sign in to comment.