mirror of https://github.com/abpframework/abp.git
6 changed files with 186 additions and 2 deletions
@ -0,0 +1,65 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using Acme.BookStore.BookManagement.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
|
|||
namespace Acme.BookStore.BookManagement.Migrations |
|||
{ |
|||
[DbContext(typeof(MyProjectHttpApiHostMigrationsDbContext))] |
|||
[Migration("20190914101054_Added_Books")] |
|||
partial class Added_Books |
|||
{ |
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079") |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
modelBuilder.Entity("Acme.BookStore.BookManagement.Books.Book", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<float>("Price"); |
|||
|
|||
b.Property<DateTime>("PublishDate"); |
|||
|
|||
b.Property<int>("Type"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("BmBooks"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Acme.BookStore.BookManagement.Migrations |
|||
{ |
|||
public partial class Added_Books : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "BmBooks", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|||
CreationTime = table.Column<DateTime>(nullable: false), |
|||
CreatorId = table.Column<Guid>(nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|||
LastModifierId = table.Column<Guid>(nullable: true), |
|||
Name = table.Column<string>(maxLength: 128, nullable: false), |
|||
Type = table.Column<int>(nullable: false), |
|||
PublishDate = table.Column<DateTime>(nullable: false), |
|||
Price = table.Column<float>(nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_BmBooks", x => x.Id); |
|||
}); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "BmBooks"); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,63 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using Acme.BookStore.BookManagement.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
|
|||
namespace Acme.BookStore.BookManagement.Migrations |
|||
{ |
|||
[DbContext(typeof(MyProjectHttpApiHostMigrationsDbContext))] |
|||
partial class MyProjectHttpApiHostMigrationsDbContextModelSnapshot : ModelSnapshot |
|||
{ |
|||
protected override void BuildModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079") |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
modelBuilder.Entity("Acme.BookStore.BookManagement.Books.Book", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<float>("Price"); |
|||
|
|||
b.Property<DateTime>("PublishDate"); |
|||
|
|||
b.Property<int>("Type"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("BmBooks"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue