Skip to content

Commit

Permalink
Update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
realLiangshiwei committed Oct 15, 2020
1 parent 1c09715 commit 87b0bd6
Show file tree
Hide file tree
Showing 78 changed files with 39,438 additions and 622 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace Acme.BookStore.Migrations
{
public partial class Upgraded_To_Abp_3_2_1 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IsExternal",
table: "AbpUsers",
nullable: false,
defaultValue: false);

migrationBuilder.CreateTable(
name: "AbpSecurityLogs",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true),
TenantId = table.Column<Guid>(nullable: true),
ApplicationName = table.Column<string>(maxLength: 96, nullable: true),
Identity = table.Column<string>(maxLength: 96, nullable: true),
Action = table.Column<string>(maxLength: 96, nullable: true),
UserId = table.Column<Guid>(nullable: true),
UserName = table.Column<string>(maxLength: 256, nullable: true),
TenantName = table.Column<string>(maxLength: 64, nullable: true),
ClientId = table.Column<string>(maxLength: 64, nullable: true),
CorrelationId = table.Column<string>(maxLength: 64, nullable: true),
ClientIpAddress = table.Column<string>(maxLength: 64, nullable: true),
BrowserInfo = table.Column<string>(maxLength: 512, nullable: true),
CreationTime = table.Column<DateTime>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id);
});

migrationBuilder.CreateIndex(
name: "IX_AbpSecurityLogs_TenantId_Action",
table: "AbpSecurityLogs",
columns: new[] { "TenantId", "Action" });

migrationBuilder.CreateIndex(
name: "IX_AbpSecurityLogs_TenantId_ApplicationName",
table: "AbpSecurityLogs",
columns: new[] { "TenantId", "ApplicationName" });

migrationBuilder.CreateIndex(
name: "IX_AbpSecurityLogs_TenantId_Identity",
table: "AbpSecurityLogs",
columns: new[] { "TenantId", "Identity" });

migrationBuilder.CreateIndex(
name: "IX_AbpSecurityLogs_TenantId_UserId",
table: "AbpSecurityLogs",
columns: new[] { "TenantId", "UserId" });
}

protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AbpSecurityLogs");

migrationBuilder.DropColumn(
name: "IsExternal",
table: "AbpUsers");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "3.1.5")
.HasAnnotation("ProductVersion", "3.1.6")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

Expand Down Expand Up @@ -486,6 +486,81 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("AbpRoleClaims");
});

modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");

b.Property<string>("Action")
.HasColumnType("nvarchar(96)")
.HasMaxLength(96);

b.Property<string>("ApplicationName")
.HasColumnType("nvarchar(96)")
.HasMaxLength(96);

b.Property<string>("BrowserInfo")
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);

b.Property<string>("ClientId")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);

b.Property<string>("ClientIpAddress")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);

b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasColumnType("nvarchar(40)")
.HasMaxLength(40);

b.Property<string>("CorrelationId")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);

b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");

b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");

b.Property<string>("Identity")
.HasColumnType("nvarchar(96)")
.HasMaxLength(96);

b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");

b.Property<string>("TenantName")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);

b.Property<Guid?>("UserId")
.HasColumnType("uniqueidentifier");

b.Property<string>("UserName")
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);

b.HasKey("Id");

b.HasIndex("TenantId", "Action");

b.HasIndex("TenantId", "ApplicationName");

b.HasIndex("TenantId", "Identity");

b.HasIndex("TenantId", "UserId");

b.ToTable("AbpSecurityLogs");
});

modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
{
b.Property<Guid>("Id")
Expand Down Expand Up @@ -542,6 +617,12 @@ protected override void BuildModel(ModelBuilder modelBuilder)
.HasColumnType("bit")
.HasDefaultValue(false);

b.Property<bool>("IsExternal")
.ValueGeneratedOnAdd()
.HasColumnName("IsExternal")
.HasColumnType("bit")
.HasDefaultValue(false);

b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime")
.HasColumnType("datetime2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Volo.Abp.PermissionManagement.MongoDB;
using Volo.Abp.SettingManagement.MongoDB;
using Volo.Abp.TenantManagement.MongoDB;
using Volo.Abp.Uow;

namespace Acme.BookStore.MongoDB
{
Expand All @@ -30,6 +31,11 @@ public override void ConfigureServices(ServiceConfigurationContext context)
{
options.AddDefaultRepositories();
});

Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
}
}
}
Loading

0 comments on commit 87b0bd6

Please sign in to comment.