Skip to content
This repository has been archived by the owner on Jun 5, 2022. It is now read-only.

Commit

Permalink
db started
Browse files Browse the repository at this point in the history
  • Loading branch information
savaged committed Jan 10, 2019
1 parent bb55def commit f1bbf4c
Show file tree
Hide file tree
Showing 5 changed files with 318 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/server/SixNations.Server/Data/ApplicationDbContext.cs
Expand Up @@ -15,5 +15,7 @@ public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
}

public DbSet<Requirement> Requirement { get; set; }


}
}

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

@@ -0,0 +1,34 @@
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

namespace SixNations.Server.Data.Migrations
{
public partial class InitialCreate : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Requirement",
columns: table => new
{
RequirementID = table.Column<int>(nullable: false)
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
Story = table.Column<string>(nullable: true),
Release = table.Column<string>(nullable: true),
Estimation = table.Column<int>(nullable: false),
Priority = table.Column<int>(nullable: false),
Status = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Requirement", x => x.RequirementID);
});
}

protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Requirement");
}
}
}
@@ -1,10 +1,10 @@
// <auto-generated />
// <auto-generated />
using System;
using SixNations.Server.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SixNations.Server.Data;

namespace SixNations.Server.Data.Migrations
{
Expand All @@ -15,7 +15,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0")
.HasAnnotation("ProductVersion", "2.1.4-rtm-31024")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

Expand Down Expand Up @@ -184,6 +184,27 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("AspNetUserTokens");
});

modelBuilder.Entity("SixNations.Server.Models.Requirement", b =>
{
b.Property<int>("RequirementID")
.ValueGeneratedOnAdd()
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<int>("Estimation");
b.Property<int>("Priority");
b.Property<string>("Release");
b.Property<int>("Status");
b.Property<string>("Story");
b.HasKey("RequirementID");
b.ToTable("Requirement");
});

modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole")
Expand Down
2 changes: 1 addition & 1 deletion src/server/SixNations.Server/appsettings.json
@@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-SixNations.Server-D4B87DBA-5DCA-4F27-8CE0-E6ADF5758116;Trusted_Connection=True;MultipleActiveResultSets=true"
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=SixNations;Trusted_Connection=True;MultipleActiveResultSets=true"
},
"Logging": {
"LogLevel": {
Expand Down

0 comments on commit f1bbf4c

Please sign in to comment.