Update template projects migrations.

pull/4578/head
maliming 5 years ago
parent debdebba48
commit 8f9d0bfdfb

@ -11,17 +11,17 @@ using Volo.Abp.EntityFrameworkCore;
namespace MyCompanyName.MyProjectName.Migrations
{
[DbContext(typeof(MyProjectNameHttpApiHostMigrationsDbContext))]
[Migration("20200928072851_Initial")]
[Migration("20201019021119_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseIdentityColumns()
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "3.1.6")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
.HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6");
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
@ -30,99 +30,99 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier");
b.Property<string>("ApplicationName")
.HasColumnName("ApplicationName")
.HasMaxLength(96)
.HasColumnType("nvarchar(96)")
.HasMaxLength(96);
.HasColumnName("ApplicationName");
b.Property<string>("BrowserInfo")
.HasColumnName("BrowserInfo")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
.HasColumnName("BrowserInfo");
b.Property<string>("ClientId")
.HasColumnName("ClientId")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasColumnName("ClientId");
b.Property<string>("ClientIpAddress")
.HasColumnName("ClientIpAddress")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasColumnName("ClientIpAddress");
b.Property<string>("ClientName")
.HasColumnName("ClientName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasColumnName("ClientName");
b.Property<string>("Comments")
.HasColumnName("Comments")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasColumnName("Comments");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasMaxLength(40);
.HasColumnName("ConcurrencyStamp");
b.Property<string>("CorrelationId")
.HasColumnName("CorrelationId")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasColumnName("CorrelationId");
b.Property<string>("Exceptions")
.HasColumnName("Exceptions")
.HasMaxLength(4000)
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
.HasColumnName("Exceptions");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration")
.HasColumnType("int");
.HasColumnType("int")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("HttpMethod")
.HasColumnName("HttpMethod")
.HasMaxLength(16)
.HasColumnType("nvarchar(16)")
.HasMaxLength(16);
.HasColumnName("HttpMethod");
b.Property<int?>("HttpStatusCode")
.HasColumnName("HttpStatusCode")
.HasColumnType("int");
.HasColumnType("int")
.HasColumnName("HttpStatusCode");
b.Property<Guid?>("ImpersonatorTenantId")
.HasColumnName("ImpersonatorTenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("ImpersonatorTenantId");
b.Property<Guid?>("ImpersonatorUserId")
.HasColumnName("ImpersonatorUserId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("ImpersonatorUserId");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<string>("TenantName")
.HasColumnType("nvarchar(max)");
b.Property<string>("Url")
.HasColumnName("Url")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasColumnName("Url");
b.Property<Guid?>("UserId")
.HasColumnName("UserId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("UserId");
b.Property<string>("UserName")
.HasColumnName("UserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasColumnName("UserName");
b.HasKey("Id");
@ -140,39 +140,39 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier");
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("AuditLogId");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration")
.HasColumnType("int");
.HasColumnType("int")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnName("ExecutionTime")
.HasColumnType("datetime2");
.HasColumnType("datetime2")
.HasColumnName("ExecutionTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("MethodName")
.HasColumnName("MethodName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasColumnName("MethodName");
b.Property<string>("Parameters")
.HasColumnName("Parameters")
.HasMaxLength(2000)
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
.HasColumnName("Parameters");
b.Property<string>("ServiceName")
.HasColumnName("ServiceName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasColumnName("ServiceName");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -190,39 +190,39 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier");
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("AuditLogId");
b.Property<DateTime>("ChangeTime")
.HasColumnName("ChangeTime")
.HasColumnType("datetime2");
.HasColumnType("datetime2")
.HasColumnName("ChangeTime");
b.Property<byte>("ChangeType")
.HasColumnName("ChangeType")
.HasColumnType("tinyint");
.HasColumnType("tinyint")
.HasColumnName("ChangeType");
b.Property<string>("EntityId")
.IsRequired()
.HasColumnName("EntityId")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasColumnName("EntityId");
b.Property<Guid?>("EntityTenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("EntityTypeFullName")
.IsRequired()
.HasColumnName("EntityTypeFullName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasColumnName("EntityTypeFullName");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -243,30 +243,30 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier");
b.Property<string>("NewValue")
.HasColumnName("NewValue")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
.HasColumnName("NewValue");
b.Property<string>("OriginalValue")
.HasColumnName("OriginalValue")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
.HasColumnName("OriginalValue");
b.Property<string>("PropertyName")
.IsRequired()
.HasColumnName("PropertyName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasColumnName("PropertyName");
b.Property<string>("PropertyTypeFullName")
.IsRequired()
.HasColumnName("PropertyTypeFullName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasColumnName("PropertyTypeFullName");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -283,22 +283,22 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("ProviderKey")
.IsRequired()
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ProviderName")
.IsRequired()
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -315,21 +315,21 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("ProviderKey")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ProviderName")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2048)")
.HasMaxLength(2048);
.HasMaxLength(2048)
.HasColumnType("nvarchar(2048)");
b.HasKey("Id");
@ -364,6 +364,18 @@ namespace MyCompanyName.MyProjectName.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Navigation("Actions");
b.Navigation("EntityChanges");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Navigation("PropertyChanges");
});
#pragma warning restore 612, 618
}
}

@ -11,28 +11,28 @@ namespace MyCompanyName.MyProjectName.Migrations
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)
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ApplicationName = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantName = table.Column<string>(type: "nvarchar(max)", nullable: true),
ImpersonatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ImpersonatorTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ExecutionTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ExecutionDuration = table.Column<int>(type: "int", nullable: false),
ClientIpAddress = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ClientName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CorrelationId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
BrowserInfo = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
HttpMethod = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
Url = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
Exceptions = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: true),
Comments = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
HttpStatusCode = table.Column<int>(type: "int", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
@ -43,11 +43,11 @@ namespace MyCompanyName.MyProjectName.Migrations
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)
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{
@ -58,11 +58,11 @@ namespace MyCompanyName.MyProjectName.Migrations
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)
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Value = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: false),
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true)
},
constraints: table =>
{
@ -73,15 +73,15 @@ namespace MyCompanyName.MyProjectName.Migrations
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)
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AuditLogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ServiceName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
MethodName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Parameters = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
ExecutionTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ExecutionDuration = table.Column<int>(type: "int", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
@ -98,15 +98,15 @@ namespace MyCompanyName.MyProjectName.Migrations
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)
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
AuditLogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ChangeTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ChangeType = table.Column<byte>(type: "tinyint", nullable: false),
EntityTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
EntityId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
EntityTypeFullName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
@ -123,13 +123,13 @@ namespace MyCompanyName.MyProjectName.Migrations
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)
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
EntityChangeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
NewValue = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
OriginalValue = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
PropertyName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
PropertyTypeFullName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{

@ -16,10 +16,10 @@ namespace MyCompanyName.MyProjectName.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.UseIdentityColumns()
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "3.1.6")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
.HasAnnotation("ProductVersion", "5.0.0-rc.2.20475.6");
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
@ -28,99 +28,99 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier");
b.Property<string>("ApplicationName")
.HasColumnName("ApplicationName")
.HasMaxLength(96)
.HasColumnType("nvarchar(96)")
.HasMaxLength(96);
.HasColumnName("ApplicationName");
b.Property<string>("BrowserInfo")
.HasColumnName("BrowserInfo")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
.HasColumnName("BrowserInfo");
b.Property<string>("ClientId")
.HasColumnName("ClientId")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasColumnName("ClientId");
b.Property<string>("ClientIpAddress")
.HasColumnName("ClientIpAddress")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasColumnName("ClientIpAddress");
b.Property<string>("ClientName")
.HasColumnName("ClientName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasColumnName("ClientName");
b.Property<string>("Comments")
.HasColumnName("Comments")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasColumnName("Comments");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp")
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasMaxLength(40);
.HasColumnName("ConcurrencyStamp");
b.Property<string>("CorrelationId")
.HasColumnName("CorrelationId")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasColumnName("CorrelationId");
b.Property<string>("Exceptions")
.HasColumnName("Exceptions")
.HasMaxLength(4000)
.HasColumnType("nvarchar(4000)")
.HasMaxLength(4000);
.HasColumnName("Exceptions");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration")
.HasColumnType("int");
.HasColumnType("int")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("HttpMethod")
.HasColumnName("HttpMethod")
.HasMaxLength(16)
.HasColumnType("nvarchar(16)")
.HasMaxLength(16);
.HasColumnName("HttpMethod");
b.Property<int?>("HttpStatusCode")
.HasColumnName("HttpStatusCode")
.HasColumnType("int");
.HasColumnType("int")
.HasColumnName("HttpStatusCode");
b.Property<Guid?>("ImpersonatorTenantId")
.HasColumnName("ImpersonatorTenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("ImpersonatorTenantId");
b.Property<Guid?>("ImpersonatorUserId")
.HasColumnName("ImpersonatorUserId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("ImpersonatorUserId");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<string>("TenantName")
.HasColumnType("nvarchar(max)");
b.Property<string>("Url")
.HasColumnName("Url")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasColumnName("Url");
b.Property<Guid?>("UserId")
.HasColumnName("UserId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("UserId");
b.Property<string>("UserName")
.HasColumnName("UserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasColumnName("UserName");
b.HasKey("Id");
@ -138,39 +138,39 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier");
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("AuditLogId");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration")
.HasColumnType("int");
.HasColumnType("int")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnName("ExecutionTime")
.HasColumnType("datetime2");
.HasColumnType("datetime2")
.HasColumnName("ExecutionTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("MethodName")
.HasColumnName("MethodName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasColumnName("MethodName");
b.Property<string>("Parameters")
.HasColumnName("Parameters")
.HasMaxLength(2000)
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
.HasColumnName("Parameters");
b.Property<string>("ServiceName")
.HasColumnName("ServiceName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasMaxLength(256);
.HasColumnName("ServiceName");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -188,39 +188,39 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier");
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("AuditLogId");
b.Property<DateTime>("ChangeTime")
.HasColumnName("ChangeTime")
.HasColumnType("datetime2");
.HasColumnType("datetime2")
.HasColumnName("ChangeTime");
b.Property<byte>("ChangeType")
.HasColumnName("ChangeType")
.HasColumnType("tinyint");
.HasColumnType("tinyint")
.HasColumnName("ChangeType");
b.Property<string>("EntityId")
.IsRequired()
.HasColumnName("EntityId")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasColumnName("EntityId");
b.Property<Guid?>("EntityTenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("EntityTypeFullName")
.IsRequired()
.HasColumnName("EntityTypeFullName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasColumnName("EntityTypeFullName");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -241,30 +241,30 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier");
b.Property<string>("NewValue")
.HasColumnName("NewValue")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
.HasColumnName("NewValue");
b.Property<string>("OriginalValue")
.HasColumnName("OriginalValue")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)")
.HasMaxLength(512);
.HasColumnName("OriginalValue");
b.Property<string>("PropertyName")
.IsRequired()
.HasColumnName("PropertyName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasColumnName("PropertyName");
b.Property<string>("PropertyTypeFullName")
.IsRequired()
.HasColumnName("PropertyTypeFullName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasColumnName("PropertyTypeFullName");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -281,22 +281,22 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("ProviderKey")
.IsRequired()
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ProviderName")
.IsRequired()
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId")
.HasColumnType("uniqueidentifier");
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("Id");
@ -313,21 +313,21 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(128)")
.HasMaxLength(128);
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("ProviderKey")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ProviderName")
.HasColumnType("nvarchar(64)")
.HasMaxLength(64);
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2048)")
.HasMaxLength(2048);
.HasMaxLength(2048)
.HasColumnType("nvarchar(2048)");
b.HasKey("Id");
@ -362,6 +362,18 @@ namespace MyCompanyName.MyProjectName.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Navigation("Actions");
b.Navigation("EntityChanges");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Navigation("PropertyChanges");
});
#pragma warning restore 612, 618
}
}

@ -0,0 +1,726 @@
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>(type: "uniqueidentifier", nullable: false),
ApplicationName = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TenantName = table.Column<string>(type: "nvarchar(max)", nullable: true),
ImpersonatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ImpersonatorTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ExecutionTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ExecutionDuration = table.Column<int>(type: "int", nullable: false),
ClientIpAddress = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ClientName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CorrelationId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
BrowserInfo = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
HttpMethod = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
Url = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
Exceptions = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: true),
Comments = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
HttpStatusCode = table.Column<int>(type: "int", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpAuditLogs", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpClaimTypes",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Required = table.Column<bool>(type: "bit", nullable: false),
IsStatic = table.Column<bool>(type: "bit", nullable: false),
Regex = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
RegexDescription = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Description = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
ValueType = table.Column<int>(type: "int", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpClaimTypes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpFeatureValues",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Value = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpFeatureValues", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpLinkUsers",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SourceUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
SourceTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
TargetUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TargetTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpLinkUsers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpOrganizationUnits",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Code = table.Column<string>(type: "nvarchar(95)", maxLength: 95, nullable: false),
DisplayName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id);
table.ForeignKey(
name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId",
column: x => x.ParentId,
principalTable: "AbpOrganizationUnits",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "AbpPermissionGrants",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpRoles",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
NormalizedName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
IsDefault = table.Column<bool>(type: "bit", nullable: false),
IsStatic = table.Column<bool>(type: "bit", nullable: false),
IsPublic = table.Column<bool>(type: "bit", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpRoles", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpSecurityLogs",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ApplicationName = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true),
Identity = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true),
Action = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
TenantName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
CorrelationId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ClientIpAddress = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
BrowserInfo = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpSettings",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
Value = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: false),
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpSettings", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpTenants",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpTenants", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpUsers",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
NormalizedUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Surname = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
NormalizedEmail = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
EmailConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
PasswordHash = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
SecurityStamp = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
IsExternal = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
PhoneNumber = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
TwoFactorEnabled = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
LockoutEnd = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
LockoutEnabled = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
AccessFailedCount = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUsers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpAuditLogActions",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
AuditLogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ServiceName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
MethodName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Parameters = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
ExecutionTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ExecutionDuration = table.Column<int>(type: "int", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", 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>(type: "uniqueidentifier", nullable: false),
AuditLogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ChangeTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ChangeType = table.Column<byte>(type: "tinyint", nullable: false),
EntityTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
EntityId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
EntityTypeFullName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", 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: "AbpOrganizationUnitRoles",
columns: table => new
{
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OrganizationUnitId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId });
table.ForeignKey(
name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId",
column: x => x.OrganizationUnitId,
principalTable: "AbpOrganizationUnits",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId",
column: x => x.RoleId,
principalTable: "AbpRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpRoleClaims",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ClaimType = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
ClaimValue = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpRoleClaims", x => x.Id);
table.ForeignKey(
name: "FK_AbpRoleClaims_AbpRoles_RoleId",
column: x => x.RoleId,
principalTable: "AbpRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpTenantConnectionStrings",
columns: table => new
{
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Value = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name });
table.ForeignKey(
name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId",
column: x => x.TenantId,
principalTable: "AbpTenants",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpUserClaims",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ClaimType = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
ClaimValue = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserClaims", x => x.Id);
table.ForeignKey(
name: "FK_AbpUserClaims_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpUserLogins",
columns: table => new
{
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
LoginProvider = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
ProviderKey = table.Column<string>(type: "nvarchar(196)", maxLength: 196, nullable: false),
ProviderDisplayName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider });
table.ForeignKey(
name: "FK_AbpUserLogins_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpUserOrganizationUnits",
columns: table => new
{
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
OrganizationUnitId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId });
table.ForeignKey(
name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId",
column: x => x.OrganizationUnitId,
principalTable: "AbpOrganizationUnits",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpUserRoles",
columns: table => new
{
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId });
table.ForeignKey(
name: "FK_AbpUserRoles_AbpRoles_RoleId",
column: x => x.RoleId,
principalTable: "AbpRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AbpUserRoles_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpUserTokens",
columns: table => new
{
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
LoginProvider = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Value = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
table.ForeignKey(
name: "FK_AbpUserTokens_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AbpEntityPropertyChanges",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
EntityChangeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
NewValue = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
OriginalValue = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
PropertyName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
PropertyTypeFullName = table.Column<string>(type: "nvarchar(64)", 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_AbpFeatureValues_Name_ProviderName_ProviderKey",
table: "AbpFeatureValues",
columns: new[] { "Name", "ProviderName", "ProviderKey" });
migrationBuilder.CreateIndex(
name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId",
table: "AbpLinkUsers",
columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" },
unique: true,
filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId",
table: "AbpOrganizationUnitRoles",
columns: new[] { "RoleId", "OrganizationUnitId" });
migrationBuilder.CreateIndex(
name: "IX_AbpOrganizationUnits_Code",
table: "AbpOrganizationUnits",
column: "Code");
migrationBuilder.CreateIndex(
name: "IX_AbpOrganizationUnits_ParentId",
table: "AbpOrganizationUnits",
column: "ParentId");
migrationBuilder.CreateIndex(
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey",
table: "AbpPermissionGrants",
columns: new[] { "Name", "ProviderName", "ProviderKey" });
migrationBuilder.CreateIndex(
name: "IX_AbpRoleClaims_RoleId",
table: "AbpRoleClaims",
column: "RoleId");
migrationBuilder.CreateIndex(
name: "IX_AbpRoles_NormalizedName",
table: "AbpRoles",
column: "NormalizedName");
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" });
migrationBuilder.CreateIndex(
name: "IX_AbpSettings_Name_ProviderName_ProviderKey",
table: "AbpSettings",
columns: new[] { "Name", "ProviderName", "ProviderKey" });
migrationBuilder.CreateIndex(
name: "IX_AbpTenants_Name",
table: "AbpTenants",
column: "Name");
migrationBuilder.CreateIndex(
name: "IX_AbpUserClaims_UserId",
table: "AbpUserClaims",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_AbpUserLogins_LoginProvider_ProviderKey",
table: "AbpUserLogins",
columns: new[] { "LoginProvider", "ProviderKey" });
migrationBuilder.CreateIndex(
name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId",
table: "AbpUserOrganizationUnits",
columns: new[] { "UserId", "OrganizationUnitId" });
migrationBuilder.CreateIndex(
name: "IX_AbpUserRoles_RoleId_UserId",
table: "AbpUserRoles",
columns: new[] { "RoleId", "UserId" });
migrationBuilder.CreateIndex(
name: "IX_AbpUsers_Email",
table: "AbpUsers",
column: "Email");
migrationBuilder.CreateIndex(
name: "IX_AbpUsers_NormalizedEmail",
table: "AbpUsers",
column: "NormalizedEmail");
migrationBuilder.CreateIndex(
name: "IX_AbpUsers_NormalizedUserName",
table: "AbpUsers",
column: "NormalizedUserName");
migrationBuilder.CreateIndex(
name: "IX_AbpUsers_UserName",
table: "AbpUsers",
column: "UserName");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AbpAuditLogActions");
migrationBuilder.DropTable(
name: "AbpClaimTypes");
migrationBuilder.DropTable(
name: "AbpEntityPropertyChanges");
migrationBuilder.DropTable(
name: "AbpFeatureValues");
migrationBuilder.DropTable(
name: "AbpLinkUsers");
migrationBuilder.DropTable(
name: "AbpOrganizationUnitRoles");
migrationBuilder.DropTable(
name: "AbpPermissionGrants");
migrationBuilder.DropTable(
name: "AbpRoleClaims");
migrationBuilder.DropTable(
name: "AbpSecurityLogs");
migrationBuilder.DropTable(
name: "AbpSettings");
migrationBuilder.DropTable(
name: "AbpTenantConnectionStrings");
migrationBuilder.DropTable(
name: "AbpUserClaims");
migrationBuilder.DropTable(
name: "AbpUserLogins");
migrationBuilder.DropTable(
name: "AbpUserOrganizationUnits");
migrationBuilder.DropTable(
name: "AbpUserRoles");
migrationBuilder.DropTable(
name: "AbpUserTokens");
migrationBuilder.DropTable(
name: "AbpEntityChanges");
migrationBuilder.DropTable(
name: "AbpTenants");
migrationBuilder.DropTable(
name: "AbpOrganizationUnits");
migrationBuilder.DropTable(
name: "AbpRoles");
migrationBuilder.DropTable(
name: "AbpUsers");
migrationBuilder.DropTable(
name: "AbpAuditLogs");
}
}
}
Loading…
Cancel
Save