Commit 22c4ad55 authored by Savorboard's avatar Savorboard

update migration files.

parent 045b9592
...@@ -8,8 +8,8 @@ using DotNetCore.CAP.EntityFrameworkCore.Test; ...@@ -8,8 +8,8 @@ using DotNetCore.CAP.EntityFrameworkCore.Test;
namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations
{ {
[DbContext(typeof(TestDbContext))] [DbContext(typeof(TestDbContext))]
[Migration("20170629074320_InitCreate")] [Migration("20170708050416_InitDB")]
partial class InitCreate partial class InitDB
{ {
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
{ {
...@@ -26,6 +26,8 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations ...@@ -26,6 +26,8 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations
b.Property<string>("Content"); b.Property<string>("Content");
b.Property<string>("Group");
b.Property<string>("KeyName"); b.Property<string>("KeyName");
b.Property<DateTime>("LastRun"); b.Property<DateTime>("LastRun");
......
...@@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations; ...@@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations
{ {
public partial class InitCreate : Migration public partial class InitDB : Migration
{ {
protected override void Up(MigrationBuilder migrationBuilder) protected override void Up(MigrationBuilder migrationBuilder)
{ {
...@@ -15,12 +15,16 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations ...@@ -15,12 +15,16 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations
Id = table.Column<string>(nullable: false), Id = table.Column<string>(nullable: false),
Added = table.Column<DateTime>(nullable: false), Added = table.Column<DateTime>(nullable: false),
Content = table.Column<string>(nullable: true), Content = table.Column<string>(nullable: true),
Group = table.Column<string>(nullable: true),
KeyName = table.Column<string>(nullable: true), KeyName = table.Column<string>(nullable: true),
LastRun = table.Column<DateTime>(nullable: false), LastRun = table.Column<DateTime>(nullable: false),
Retries = table.Column<int>(nullable: false), Retries = table.Column<int>(nullable: false),
StatusName = table.Column<string>(maxLength: 50, nullable: true) StatusName = table.Column<string>(maxLength: 50, nullable: true)
}, },
constraints: table => { table.PrimaryKey("PK_CapReceivedMessages", x => x.Id); }); constraints: table =>
{
table.PrimaryKey("PK_CapReceivedMessages", x => x.Id);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "CapSentMessages", name: "CapSentMessages",
...@@ -34,7 +38,10 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations ...@@ -34,7 +38,10 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations
Retries = table.Column<int>(nullable: false), Retries = table.Column<int>(nullable: false),
StatusName = table.Column<string>(maxLength: 50, nullable: true) StatusName = table.Column<string>(maxLength: 50, nullable: true)
}, },
constraints: table => { table.PrimaryKey("PK_CapSentMessages", x => x.Id); }); constraints: table =>
{
table.PrimaryKey("PK_CapSentMessages", x => x.Id);
});
} }
protected override void Down(MigrationBuilder migrationBuilder) protected override void Down(MigrationBuilder migrationBuilder)
...@@ -46,4 +53,4 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations ...@@ -46,4 +53,4 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations
name: "CapSentMessages"); name: "CapSentMessages");
} }
} }
} }
\ No newline at end of file
...@@ -17,50 +17,52 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations ...@@ -17,50 +17,52 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("DotNetCore.CAP.Infrastructure.CapReceivedMessage", b => modelBuilder.Entity("DotNetCore.CAP.Infrastructure.CapReceivedMessage", b =>
{ {
b.Property<string>("Id") b.Property<string>("Id")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<DateTime>("Added"); b.Property<DateTime>("Added");
b.Property<string>("Content"); b.Property<string>("Content");
b.Property<string>("KeyName"); b.Property<string>("Group");
b.Property<DateTime>("LastRun"); b.Property<string>("KeyName");
b.Property<int>("Retries"); b.Property<DateTime>("LastRun");
b.Property<string>("StatusName") b.Property<int>("Retries");
.HasMaxLength(50);
b.HasKey("Id"); b.Property<string>("StatusName")
.HasMaxLength(50);
b.ToTable("CapReceivedMessages"); b.HasKey("Id");
});
b.ToTable("CapReceivedMessages");
});
modelBuilder.Entity("DotNetCore.CAP.Infrastructure.CapSentMessage", b => modelBuilder.Entity("DotNetCore.CAP.Infrastructure.CapSentMessage", b =>
{ {
b.Property<string>("Id") b.Property<string>("Id")
.ValueGeneratedOnAdd(); .ValueGeneratedOnAdd();
b.Property<DateTime>("Added"); b.Property<DateTime>("Added");
b.Property<string>("Content"); b.Property<string>("Content");
b.Property<string>("KeyName"); b.Property<string>("KeyName");
b.Property<DateTime>("LastRun"); b.Property<DateTime>("LastRun");
b.Property<int>("Retries"); b.Property<int>("Retries");
b.Property<string>("StatusName") b.Property<string>("StatusName")
.HasMaxLength(50); .HasMaxLength(50);
b.HasKey("Id"); b.HasKey("Id");
b.ToTable("CapSentMessages"); b.ToTable("CapSentMessages");
}); });
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment