mirror of https://github.com/abpframework/abp.git
6 changed files with 958 additions and 2 deletions
@ -0,0 +1,370 @@ |
|||||
|
// <auto-generated />
|
||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.EntityFrameworkCore.Infrastructure; |
||||
|
using Microsoft.EntityFrameworkCore.Metadata; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
||||
|
using MyCompanyName.MyProjectName.EntityFrameworkCore; |
||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
|
||||
|
namespace MyCompanyName.MyProjectName.Migrations |
||||
|
{ |
||||
|
[DbContext(typeof(MyProjectNameHttpApiHostMigrationsDbContext))] |
||||
|
[Migration("20200928072851_Initial")] |
||||
|
partial class Initial |
||||
|
{ |
||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
||||
|
{ |
||||
|
#pragma warning disable 612, 618
|
||||
|
modelBuilder |
||||
|
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) |
||||
|
.HasAnnotation("ProductVersion", "3.1.6") |
||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
||||
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("ApplicationName") |
||||
|
.HasColumnName("ApplicationName") |
||||
|
.HasColumnType("nvarchar(96)") |
||||
|
.HasMaxLength(96); |
||||
|
|
||||
|
b.Property<string>("BrowserInfo") |
||||
|
.HasColumnName("BrowserInfo") |
||||
|
.HasColumnType("nvarchar(512)") |
||||
|
.HasMaxLength(512); |
||||
|
|
||||
|
b.Property<string>("ClientId") |
||||
|
.HasColumnName("ClientId") |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<string>("ClientIpAddress") |
||||
|
.HasColumnName("ClientIpAddress") |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<string>("ClientName") |
||||
|
.HasColumnName("ClientName") |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("Comments") |
||||
|
.HasColumnName("Comments") |
||||
|
.HasColumnType("nvarchar(256)") |
||||
|
.HasMaxLength(256); |
||||
|
|
||||
|
b.Property<string>("ConcurrencyStamp") |
||||
|
.IsConcurrencyToken() |
||||
|
.HasColumnName("ConcurrencyStamp") |
||||
|
.HasColumnType("nvarchar(40)") |
||||
|
.HasMaxLength(40); |
||||
|
|
||||
|
b.Property<string>("CorrelationId") |
||||
|
.HasColumnName("CorrelationId") |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<string>("Exceptions") |
||||
|
.HasColumnName("Exceptions") |
||||
|
.HasColumnType("nvarchar(4000)") |
||||
|
.HasMaxLength(4000); |
||||
|
|
||||
|
b.Property<int>("ExecutionDuration") |
||||
|
.HasColumnName("ExecutionDuration") |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.Property<DateTime>("ExecutionTime") |
||||
|
.HasColumnType("datetime2"); |
||||
|
|
||||
|
b.Property<string>("ExtraProperties") |
||||
|
.HasColumnName("ExtraProperties") |
||||
|
.HasColumnType("nvarchar(max)"); |
||||
|
|
||||
|
b.Property<string>("HttpMethod") |
||||
|
.HasColumnName("HttpMethod") |
||||
|
.HasColumnType("nvarchar(16)") |
||||
|
.HasMaxLength(16); |
||||
|
|
||||
|
b.Property<int?>("HttpStatusCode") |
||||
|
.HasColumnName("HttpStatusCode") |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.Property<Guid?>("ImpersonatorTenantId") |
||||
|
.HasColumnName("ImpersonatorTenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<Guid?>("ImpersonatorUserId") |
||||
|
.HasColumnName("ImpersonatorUserId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("TenantName") |
||||
|
.HasColumnType("nvarchar(max)"); |
||||
|
|
||||
|
b.Property<string>("Url") |
||||
|
.HasColumnName("Url") |
||||
|
.HasColumnType("nvarchar(256)") |
||||
|
.HasMaxLength(256); |
||||
|
|
||||
|
b.Property<Guid?>("UserId") |
||||
|
.HasColumnName("UserId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("UserName") |
||||
|
.HasColumnName("UserName") |
||||
|
.HasColumnType("nvarchar(256)") |
||||
|
.HasMaxLength(256); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("TenantId", "ExecutionTime"); |
||||
|
|
||||
|
b.HasIndex("TenantId", "UserId", "ExecutionTime"); |
||||
|
|
||||
|
b.ToTable("AbpAuditLogs"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<Guid>("AuditLogId") |
||||
|
.HasColumnName("AuditLogId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<int>("ExecutionDuration") |
||||
|
.HasColumnName("ExecutionDuration") |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.Property<DateTime>("ExecutionTime") |
||||
|
.HasColumnName("ExecutionTime") |
||||
|
.HasColumnType("datetime2"); |
||||
|
|
||||
|
b.Property<string>("ExtraProperties") |
||||
|
.HasColumnName("ExtraProperties") |
||||
|
.HasColumnType("nvarchar(max)"); |
||||
|
|
||||
|
b.Property<string>("MethodName") |
||||
|
.HasColumnName("MethodName") |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("Parameters") |
||||
|
.HasColumnName("Parameters") |
||||
|
.HasColumnType("nvarchar(2000)") |
||||
|
.HasMaxLength(2000); |
||||
|
|
||||
|
b.Property<string>("ServiceName") |
||||
|
.HasColumnName("ServiceName") |
||||
|
.HasColumnType("nvarchar(256)") |
||||
|
.HasMaxLength(256); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("AuditLogId"); |
||||
|
|
||||
|
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); |
||||
|
|
||||
|
b.ToTable("AbpAuditLogActions"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<Guid>("AuditLogId") |
||||
|
.HasColumnName("AuditLogId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<DateTime>("ChangeTime") |
||||
|
.HasColumnName("ChangeTime") |
||||
|
.HasColumnType("datetime2"); |
||||
|
|
||||
|
b.Property<byte>("ChangeType") |
||||
|
.HasColumnName("ChangeType") |
||||
|
.HasColumnType("tinyint"); |
||||
|
|
||||
|
b.Property<string>("EntityId") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("EntityId") |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<Guid?>("EntityTenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("EntityTypeFullName") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("EntityTypeFullName") |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("ExtraProperties") |
||||
|
.HasColumnName("ExtraProperties") |
||||
|
.HasColumnType("nvarchar(max)"); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("AuditLogId"); |
||||
|
|
||||
|
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); |
||||
|
|
||||
|
b.ToTable("AbpEntityChanges"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<Guid>("EntityChangeId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("NewValue") |
||||
|
.HasColumnName("NewValue") |
||||
|
.HasColumnType("nvarchar(512)") |
||||
|
.HasMaxLength(512); |
||||
|
|
||||
|
b.Property<string>("OriginalValue") |
||||
|
.HasColumnName("OriginalValue") |
||||
|
.HasColumnType("nvarchar(512)") |
||||
|
.HasMaxLength(512); |
||||
|
|
||||
|
b.Property<string>("PropertyName") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("PropertyName") |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("PropertyTypeFullName") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("PropertyTypeFullName") |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("EntityChangeId"); |
||||
|
|
||||
|
b.ToTable("AbpEntityPropertyChanges"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("ProviderKey") |
||||
|
.IsRequired() |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<string>("ProviderName") |
||||
|
.IsRequired() |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
||||
|
|
||||
|
b.ToTable("AbpPermissionGrants"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("ProviderKey") |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<string>("ProviderName") |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<string>("Value") |
||||
|
.IsRequired() |
||||
|
.HasColumnType("nvarchar(2048)") |
||||
|
.HasMaxLength(2048); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
||||
|
|
||||
|
b.ToTable("AbpSettings"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
||||
|
{ |
||||
|
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) |
||||
|
.WithMany("Actions") |
||||
|
.HasForeignKey("AuditLogId") |
||||
|
.OnDelete(DeleteBehavior.Cascade) |
||||
|
.IsRequired(); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
||||
|
{ |
||||
|
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) |
||||
|
.WithMany("EntityChanges") |
||||
|
.HasForeignKey("AuditLogId") |
||||
|
.OnDelete(DeleteBehavior.Cascade) |
||||
|
.IsRequired(); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
||||
|
{ |
||||
|
b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) |
||||
|
.WithMany("PropertyChanges") |
||||
|
.HasForeignKey("EntityChangeId") |
||||
|
.OnDelete(DeleteBehavior.Cascade) |
||||
|
.IsRequired(); |
||||
|
}); |
||||
|
#pragma warning restore 612, 618
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,212 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace MyCompanyName.MyProjectName.Migrations |
||||
|
{ |
||||
|
public partial class Initial : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpAuditLogs", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(nullable: false), |
||||
|
ExtraProperties = table.Column<string>(nullable: true), |
||||
|
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
||||
|
ApplicationName = table.Column<string>(maxLength: 96, nullable: true), |
||||
|
UserId = table.Column<Guid>(nullable: true), |
||||
|
UserName = table.Column<string>(maxLength: 256, nullable: true), |
||||
|
TenantId = table.Column<Guid>(nullable: true), |
||||
|
TenantName = table.Column<string>(nullable: true), |
||||
|
ImpersonatorUserId = table.Column<Guid>(nullable: true), |
||||
|
ImpersonatorTenantId = table.Column<Guid>(nullable: true), |
||||
|
ExecutionTime = table.Column<DateTime>(nullable: false), |
||||
|
ExecutionDuration = table.Column<int>(nullable: false), |
||||
|
ClientIpAddress = table.Column<string>(maxLength: 64, nullable: true), |
||||
|
ClientName = table.Column<string>(maxLength: 128, nullable: true), |
||||
|
ClientId = table.Column<string>(maxLength: 64, nullable: true), |
||||
|
CorrelationId = table.Column<string>(maxLength: 64, nullable: true), |
||||
|
BrowserInfo = table.Column<string>(maxLength: 512, nullable: true), |
||||
|
HttpMethod = table.Column<string>(maxLength: 16, nullable: true), |
||||
|
Url = table.Column<string>(maxLength: 256, nullable: true), |
||||
|
Exceptions = table.Column<string>(maxLength: 4000, nullable: true), |
||||
|
Comments = table.Column<string>(maxLength: 256, nullable: true), |
||||
|
HttpStatusCode = table.Column<int>(nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpPermissionGrants", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(nullable: false), |
||||
|
TenantId = table.Column<Guid>(nullable: true), |
||||
|
Name = table.Column<string>(maxLength: 128, nullable: false), |
||||
|
ProviderName = table.Column<string>(maxLength: 64, nullable: false), |
||||
|
ProviderKey = table.Column<string>(maxLength: 64, nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpSettings", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(nullable: false), |
||||
|
Name = table.Column<string>(maxLength: 128, nullable: false), |
||||
|
Value = table.Column<string>(maxLength: 2048, nullable: false), |
||||
|
ProviderName = table.Column<string>(maxLength: 64, nullable: true), |
||||
|
ProviderKey = table.Column<string>(maxLength: 64, nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpSettings", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpAuditLogActions", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(nullable: false), |
||||
|
TenantId = table.Column<Guid>(nullable: true), |
||||
|
AuditLogId = table.Column<Guid>(nullable: false), |
||||
|
ServiceName = table.Column<string>(maxLength: 256, nullable: true), |
||||
|
MethodName = table.Column<string>(maxLength: 128, nullable: true), |
||||
|
Parameters = table.Column<string>(maxLength: 2000, nullable: true), |
||||
|
ExecutionTime = table.Column<DateTime>(nullable: false), |
||||
|
ExecutionDuration = table.Column<int>(nullable: false), |
||||
|
ExtraProperties = table.Column<string>(nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", |
||||
|
column: x => x.AuditLogId, |
||||
|
principalTable: "AbpAuditLogs", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpEntityChanges", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(nullable: false), |
||||
|
AuditLogId = table.Column<Guid>(nullable: false), |
||||
|
TenantId = table.Column<Guid>(nullable: true), |
||||
|
ChangeTime = table.Column<DateTime>(nullable: false), |
||||
|
ChangeType = table.Column<byte>(nullable: false), |
||||
|
EntityTenantId = table.Column<Guid>(nullable: true), |
||||
|
EntityId = table.Column<string>(maxLength: 128, nullable: false), |
||||
|
EntityTypeFullName = table.Column<string>(maxLength: 128, nullable: false), |
||||
|
ExtraProperties = table.Column<string>(nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", |
||||
|
column: x => x.AuditLogId, |
||||
|
principalTable: "AbpAuditLogs", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpEntityPropertyChanges", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(nullable: false), |
||||
|
TenantId = table.Column<Guid>(nullable: true), |
||||
|
EntityChangeId = table.Column<Guid>(nullable: false), |
||||
|
NewValue = table.Column<string>(maxLength: 512, nullable: true), |
||||
|
OriginalValue = table.Column<string>(maxLength: 512, nullable: true), |
||||
|
PropertyName = table.Column<string>(maxLength: 128, nullable: false), |
||||
|
PropertyTypeFullName = table.Column<string>(maxLength: 64, nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", |
||||
|
column: x => x.EntityChangeId, |
||||
|
principalTable: "AbpEntityChanges", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpAuditLogActions_AuditLogId", |
||||
|
table: "AbpAuditLogActions", |
||||
|
column: "AuditLogId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", |
||||
|
table: "AbpAuditLogActions", |
||||
|
columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpAuditLogs_TenantId_ExecutionTime", |
||||
|
table: "AbpAuditLogs", |
||||
|
columns: new[] { "TenantId", "ExecutionTime" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", |
||||
|
table: "AbpAuditLogs", |
||||
|
columns: new[] { "TenantId", "UserId", "ExecutionTime" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpEntityChanges_AuditLogId", |
||||
|
table: "AbpEntityChanges", |
||||
|
column: "AuditLogId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", |
||||
|
table: "AbpEntityChanges", |
||||
|
columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpEntityPropertyChanges_EntityChangeId", |
||||
|
table: "AbpEntityPropertyChanges", |
||||
|
column: "EntityChangeId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", |
||||
|
table: "AbpPermissionGrants", |
||||
|
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpSettings_Name_ProviderName_ProviderKey", |
||||
|
table: "AbpSettings", |
||||
|
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpAuditLogActions"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpEntityPropertyChanges"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpPermissionGrants"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpSettings"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpEntityChanges"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpAuditLogs"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,368 @@ |
|||||
|
// <auto-generated />
|
||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.EntityFrameworkCore.Infrastructure; |
||||
|
using Microsoft.EntityFrameworkCore.Metadata; |
||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
||||
|
using MyCompanyName.MyProjectName.EntityFrameworkCore; |
||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
|
||||
|
namespace MyCompanyName.MyProjectName.Migrations |
||||
|
{ |
||||
|
[DbContext(typeof(MyProjectNameHttpApiHostMigrationsDbContext))] |
||||
|
partial class MyProjectNameHttpApiHostMigrationsDbContextModelSnapshot : ModelSnapshot |
||||
|
{ |
||||
|
protected override void BuildModel(ModelBuilder modelBuilder) |
||||
|
{ |
||||
|
#pragma warning disable 612, 618
|
||||
|
modelBuilder |
||||
|
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) |
||||
|
.HasAnnotation("ProductVersion", "3.1.6") |
||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
||||
|
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("ApplicationName") |
||||
|
.HasColumnName("ApplicationName") |
||||
|
.HasColumnType("nvarchar(96)") |
||||
|
.HasMaxLength(96); |
||||
|
|
||||
|
b.Property<string>("BrowserInfo") |
||||
|
.HasColumnName("BrowserInfo") |
||||
|
.HasColumnType("nvarchar(512)") |
||||
|
.HasMaxLength(512); |
||||
|
|
||||
|
b.Property<string>("ClientId") |
||||
|
.HasColumnName("ClientId") |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<string>("ClientIpAddress") |
||||
|
.HasColumnName("ClientIpAddress") |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<string>("ClientName") |
||||
|
.HasColumnName("ClientName") |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("Comments") |
||||
|
.HasColumnName("Comments") |
||||
|
.HasColumnType("nvarchar(256)") |
||||
|
.HasMaxLength(256); |
||||
|
|
||||
|
b.Property<string>("ConcurrencyStamp") |
||||
|
.IsConcurrencyToken() |
||||
|
.HasColumnName("ConcurrencyStamp") |
||||
|
.HasColumnType("nvarchar(40)") |
||||
|
.HasMaxLength(40); |
||||
|
|
||||
|
b.Property<string>("CorrelationId") |
||||
|
.HasColumnName("CorrelationId") |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<string>("Exceptions") |
||||
|
.HasColumnName("Exceptions") |
||||
|
.HasColumnType("nvarchar(4000)") |
||||
|
.HasMaxLength(4000); |
||||
|
|
||||
|
b.Property<int>("ExecutionDuration") |
||||
|
.HasColumnName("ExecutionDuration") |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.Property<DateTime>("ExecutionTime") |
||||
|
.HasColumnType("datetime2"); |
||||
|
|
||||
|
b.Property<string>("ExtraProperties") |
||||
|
.HasColumnName("ExtraProperties") |
||||
|
.HasColumnType("nvarchar(max)"); |
||||
|
|
||||
|
b.Property<string>("HttpMethod") |
||||
|
.HasColumnName("HttpMethod") |
||||
|
.HasColumnType("nvarchar(16)") |
||||
|
.HasMaxLength(16); |
||||
|
|
||||
|
b.Property<int?>("HttpStatusCode") |
||||
|
.HasColumnName("HttpStatusCode") |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.Property<Guid?>("ImpersonatorTenantId") |
||||
|
.HasColumnName("ImpersonatorTenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<Guid?>("ImpersonatorUserId") |
||||
|
.HasColumnName("ImpersonatorUserId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("TenantName") |
||||
|
.HasColumnType("nvarchar(max)"); |
||||
|
|
||||
|
b.Property<string>("Url") |
||||
|
.HasColumnName("Url") |
||||
|
.HasColumnType("nvarchar(256)") |
||||
|
.HasMaxLength(256); |
||||
|
|
||||
|
b.Property<Guid?>("UserId") |
||||
|
.HasColumnName("UserId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("UserName") |
||||
|
.HasColumnName("UserName") |
||||
|
.HasColumnType("nvarchar(256)") |
||||
|
.HasMaxLength(256); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("TenantId", "ExecutionTime"); |
||||
|
|
||||
|
b.HasIndex("TenantId", "UserId", "ExecutionTime"); |
||||
|
|
||||
|
b.ToTable("AbpAuditLogs"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<Guid>("AuditLogId") |
||||
|
.HasColumnName("AuditLogId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<int>("ExecutionDuration") |
||||
|
.HasColumnName("ExecutionDuration") |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.Property<DateTime>("ExecutionTime") |
||||
|
.HasColumnName("ExecutionTime") |
||||
|
.HasColumnType("datetime2"); |
||||
|
|
||||
|
b.Property<string>("ExtraProperties") |
||||
|
.HasColumnName("ExtraProperties") |
||||
|
.HasColumnType("nvarchar(max)"); |
||||
|
|
||||
|
b.Property<string>("MethodName") |
||||
|
.HasColumnName("MethodName") |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("Parameters") |
||||
|
.HasColumnName("Parameters") |
||||
|
.HasColumnType("nvarchar(2000)") |
||||
|
.HasMaxLength(2000); |
||||
|
|
||||
|
b.Property<string>("ServiceName") |
||||
|
.HasColumnName("ServiceName") |
||||
|
.HasColumnType("nvarchar(256)") |
||||
|
.HasMaxLength(256); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("AuditLogId"); |
||||
|
|
||||
|
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); |
||||
|
|
||||
|
b.ToTable("AbpAuditLogActions"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<Guid>("AuditLogId") |
||||
|
.HasColumnName("AuditLogId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<DateTime>("ChangeTime") |
||||
|
.HasColumnName("ChangeTime") |
||||
|
.HasColumnType("datetime2"); |
||||
|
|
||||
|
b.Property<byte>("ChangeType") |
||||
|
.HasColumnName("ChangeType") |
||||
|
.HasColumnType("tinyint"); |
||||
|
|
||||
|
b.Property<string>("EntityId") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("EntityId") |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<Guid?>("EntityTenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("EntityTypeFullName") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("EntityTypeFullName") |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("ExtraProperties") |
||||
|
.HasColumnName("ExtraProperties") |
||||
|
.HasColumnType("nvarchar(max)"); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("AuditLogId"); |
||||
|
|
||||
|
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); |
||||
|
|
||||
|
b.ToTable("AbpEntityChanges"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<Guid>("EntityChangeId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("NewValue") |
||||
|
.HasColumnName("NewValue") |
||||
|
.HasColumnType("nvarchar(512)") |
||||
|
.HasMaxLength(512); |
||||
|
|
||||
|
b.Property<string>("OriginalValue") |
||||
|
.HasColumnName("OriginalValue") |
||||
|
.HasColumnType("nvarchar(512)") |
||||
|
.HasMaxLength(512); |
||||
|
|
||||
|
b.Property<string>("PropertyName") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("PropertyName") |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("PropertyTypeFullName") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("PropertyTypeFullName") |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("EntityChangeId"); |
||||
|
|
||||
|
b.ToTable("AbpEntityPropertyChanges"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("ProviderKey") |
||||
|
.IsRequired() |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<string>("ProviderName") |
||||
|
.IsRequired() |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
||||
|
|
||||
|
b.ToTable("AbpPermissionGrants"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("uniqueidentifier"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasColumnType("nvarchar(128)") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("ProviderKey") |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<string>("ProviderName") |
||||
|
.HasColumnType("nvarchar(64)") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<string>("Value") |
||||
|
.IsRequired() |
||||
|
.HasColumnType("nvarchar(2048)") |
||||
|
.HasMaxLength(2048); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
||||
|
|
||||
|
b.ToTable("AbpSettings"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
||||
|
{ |
||||
|
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) |
||||
|
.WithMany("Actions") |
||||
|
.HasForeignKey("AuditLogId") |
||||
|
.OnDelete(DeleteBehavior.Cascade) |
||||
|
.IsRequired(); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
||||
|
{ |
||||
|
b.HasOne("Volo.Abp.AuditLogging.AuditLog", null) |
||||
|
.WithMany("EntityChanges") |
||||
|
.HasForeignKey("AuditLogId") |
||||
|
.OnDelete(DeleteBehavior.Cascade) |
||||
|
.IsRequired(); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
||||
|
{ |
||||
|
b.HasOne("Volo.Abp.AuditLogging.EntityChange", null) |
||||
|
.WithMany("PropertyChanges") |
||||
|
.HasForeignKey("EntityChangeId") |
||||
|
.OnDelete(DeleteBehavior.Cascade) |
||||
|
.IsRequired(); |
||||
|
}); |
||||
|
#pragma warning restore 612, 618
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue