command forms :-)

This commit is contained in:
Paul Schneider 2017-01-24 10:43:42 +01:00
commit d232d4a52e
17 changed files with 214 additions and 48 deletions

View file

@ -8,8 +8,8 @@ using Yavsc.Models;
namespace Yavsc.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20170123085316_commandForm")]
partial class commandForm
[Migration("20170124090324_commandForms")]
partial class commandForms
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
@ -531,6 +531,15 @@ namespace Yavsc.Migrations
b.HasKey("ConnectionId");
});
modelBuilder.Entity("Yavsc.Models.Forms.Form", b =>
{
b.Property<string>("Id");
b.Property<string>("Summary");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
{
b.Property<string>("DeviceId");
@ -718,15 +727,16 @@ namespace Yavsc.Migrations
modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b =>
{
b.Property<string>("Id");
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ActivityCode")
.IsRequired();
b.Property<string>("Summary");
b.Property<string>("Title");
b.Property<string>("ViewName");
b.HasKey("Id");
});

View file

@ -4,7 +4,7 @@ using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class commandForm : Migration
public partial class commandForms : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
@ -32,13 +32,25 @@ namespace Yavsc.Migrations
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.CreateTable(
name: "CommandForm",
name: "Form",
columns: table => new
{
Id = table.Column<string>(nullable: false),
Summary = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Form", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CommandForm",
columns: table => new
{
Id = table.Column<long>(nullable: false)
.Annotation("Npgsql:Serial", true),
ActivityCode = table.Column<string>(nullable: false),
Summary = table.Column<string>(nullable: true),
Title = table.Column<string>(nullable: true)
Title = table.Column<string>(nullable: true),
ViewName = table.Column<string>(nullable: true)
},
constraints: table =>
{
@ -238,6 +250,7 @@ namespace Yavsc.Migrations
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropTable("Form");
migrationBuilder.DropTable("CommandForm");
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",

View file

@ -1,6 +1,8 @@
using System;
using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Infrastructure;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Migrations;
using Yavsc.Models;
namespace Yavsc.Migrations
@ -528,6 +530,15 @@ namespace Yavsc.Migrations
b.HasKey("ConnectionId");
});
modelBuilder.Entity("Yavsc.Models.Forms.Form", b =>
{
b.Property<string>("Id");
b.Property<string>("Summary");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
{
b.Property<string>("DeviceId");
@ -715,15 +726,16 @@ namespace Yavsc.Migrations
modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b =>
{
b.Property<string>("Id");
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ActivityCode")
.IsRequired();
b.Property<string>("Summary");
b.Property<string>("Title");
b.Property<string>("ViewName");
b.HasKey("Id");
});