@@ -8,8 +8,8 @@ using DotNetCore.CAP.EntityFrameworkCore.Test; | |||
namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations | |||
{ | |||
[DbContext(typeof(TestDbContext))] | |||
[Migration("20170629074320_InitCreate")] | |||
partial class InitCreate | |||
[Migration("20170708050416_InitDB")] | |||
partial class InitDB | |||
{ | |||
protected override void BuildTargetModel(ModelBuilder modelBuilder) | |||
{ | |||
@@ -26,6 +26,8 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations | |||
b.Property<string>("Content"); | |||
b.Property<string>("Group"); | |||
b.Property<string>("KeyName"); | |||
b.Property<DateTime>("LastRun"); |
@@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations; | |||
namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations | |||
{ | |||
public partial class InitCreate : Migration | |||
public partial class InitDB : Migration | |||
{ | |||
protected override void Up(MigrationBuilder migrationBuilder) | |||
{ | |||
@@ -15,12 +15,16 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations | |||
Id = table.Column<string>(nullable: false), | |||
Added = table.Column<DateTime>(nullable: false), | |||
Content = table.Column<string>(nullable: true), | |||
Group = table.Column<string>(nullable: true), | |||
KeyName = table.Column<string>(nullable: true), | |||
LastRun = table.Column<DateTime>(nullable: false), | |||
Retries = table.Column<int>(nullable: false), | |||
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( | |||
name: "CapSentMessages", | |||
@@ -34,7 +38,10 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations | |||
Retries = table.Column<int>(nullable: false), | |||
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) | |||
@@ -46,4 +53,4 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations | |||
name: "CapSentMessages"); | |||
} | |||
} | |||
} | |||
} |
@@ -17,50 +17,52 @@ namespace DotNetCore.CAP.EntityFrameworkCore.Test.Migrations | |||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); | |||
modelBuilder.Entity("DotNetCore.CAP.Infrastructure.CapReceivedMessage", b => | |||
{ | |||
b.Property<string>("Id") | |||
.ValueGeneratedOnAdd(); | |||
{ | |||
b.Property<string>("Id") | |||
.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") | |||
.HasMaxLength(50); | |||
b.Property<int>("Retries"); | |||
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 => | |||
{ | |||
b.Property<string>("Id") | |||
.ValueGeneratedOnAdd(); | |||
{ | |||
b.Property<string>("Id") | |||
.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") | |||
.HasMaxLength(50); | |||
b.Property<string>("StatusName") | |||
.HasMaxLength(50); | |||
b.HasKey("Id"); | |||
b.HasKey("Id"); | |||
b.ToTable("CapSentMessages"); | |||
}); | |||
b.ToTable("CapSentMessages"); | |||
}); | |||
} | |||
} | |||
} | |||
} |