diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContextModelCreatingExtensions.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContextModelCreatingExtensions.cs index 204bab0816..084e677214 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContextModelCreatingExtensions.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo/Abp/FeatureManagement/EntityFrameworkCore/FeatureManagementDbContextModelCreatingExtensions.cs @@ -27,7 +27,7 @@ namespace Volo.Abp.FeatureManagement.EntityFrameworkCore b.Property(x => x.ProviderName).HasMaxLength(FeatureValueConsts.MaxProviderNameLength); b.Property(x => x.ProviderKey).HasMaxLength(FeatureValueConsts.MaxProviderKeyLength); - b.HasIndex(x => new { x.Name, x.ProviderName, x.ProviderKey }).IsUnique(true); + b.HasIndex(x => new { x.Name, x.ProviderName, x.ProviderKey }); b.ApplyObjectExtensionMappings(); }); diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/TestPermissionDataBuilder.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/TestPermissionDataBuilder.cs index 77dd103132..ad94e914b5 100644 --- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/TestPermissionDataBuilder.cs +++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/TestPermissionDataBuilder.cs @@ -18,7 +18,7 @@ namespace Volo.Abp.Identity public TestPermissionDataBuilder( IGuidGenerator guidGenerator, IIdentityUserRepository userRepository, - IPermissionGrantRepository permissionGrantRepository, + IPermissionGrantRepository permissionGrantRepository, ILookupNormalizer lookupNormalizer) { _guidGenerator = guidGenerator; @@ -35,6 +35,10 @@ namespace Volo.Abp.Identity private async Task AddRolePermissions() { + await AddPermission(TestPermissionNames.MyPermission1, RolePermissionValueProvider.ProviderName, "admin"); + await AddPermission(TestPermissionNames.MyPermission2, RolePermissionValueProvider.ProviderName, "admin"); + await AddPermission(TestPermissionNames.MyPermission2_ChildPermission1, RolePermissionValueProvider.ProviderName, "admin"); + await AddPermission(TestPermissionNames.MyPermission1, RolePermissionValueProvider.ProviderName, "moderator"); await AddPermission(TestPermissionNames.MyPermission2, RolePermissionValueProvider.ProviderName, "moderator"); diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementDbContextModelBuilderExtensions.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementDbContextModelBuilderExtensions.cs index d0848eb841..100143e033 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementDbContextModelBuilderExtensions.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo/Abp/PermissionManagement/EntityFrameworkCore/AbpPermissionManagementDbContextModelBuilderExtensions.cs @@ -21,7 +21,7 @@ namespace Volo.Abp.PermissionManagement.EntityFrameworkCore b.Property(x => x.ProviderName).HasMaxLength(PermissionGrantConsts.MaxProviderNameLength).IsRequired(); b.Property(x => x.ProviderKey).HasMaxLength(PermissionGrantConsts.MaxProviderKeyLength).IsRequired(); - b.HasIndex(x => new {x.Name, x.ProviderName, x.ProviderKey}).IsUnique(true); + b.HasIndex(x => new {x.Name, x.ProviderName, x.ProviderKey}); b.ApplyObjectExtensionMappings(); }); diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/SettingManagementDbContextModelBuilderExtensions.cs b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/SettingManagementDbContextModelBuilderExtensions.cs index b01f4bc29f..aafc18f8de 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/SettingManagementDbContextModelBuilderExtensions.cs +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo/Abp/SettingManagement/EntityFrameworkCore/SettingManagementDbContextModelBuilderExtensions.cs @@ -31,7 +31,7 @@ namespace Volo.Abp.SettingManagement.EntityFrameworkCore b.Property(x => x.ProviderName).HasMaxLength(SettingConsts.MaxProviderNameLength); b.Property(x => x.ProviderKey).HasMaxLength(SettingConsts.MaxProviderKeyLength); - b.HasIndex(x => new {x.Name, x.ProviderName, x.ProviderKey}).IsUnique(true); + b.HasIndex(x => new {x.Name, x.ProviderName, x.ProviderKey}); b.ApplyObjectExtensionMappings(); }); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20211102025718_Initial.Designer.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20210909052638_Initial.Designer.cs similarity index 96% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20211102025718_Initial.Designer.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20210909052638_Initial.Designer.cs index 290d353081..fa24bfe18c 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20211102025718_Initial.Designer.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20210909052638_Initial.Designer.cs @@ -8,12 +8,10 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using MyCompanyName.MyProjectName.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; -#nullable disable - namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(MyProjectNameDbContext))] - [Migration("20211102025718_Initial")] + [Migration("20210909052638_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -21,10 +19,9 @@ namespace MyCompanyName.MyProjectName.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.0-rc.2.21480.5") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.9") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -131,7 +128,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "UserId", "ExecutionTime"); - b.ToTable("AbpAuditLogs", (string)null); + b.ToTable("AbpAuditLogs"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => @@ -181,7 +178,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - b.ToTable("AbpAuditLogActions", (string)null); + b.ToTable("AbpAuditLogActions"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => @@ -231,7 +228,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - b.ToTable("AbpEntityChanges", (string)null); + b.ToTable("AbpEntityChanges"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => @@ -273,7 +270,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("EntityChangeId"); - b.ToTable("AbpEntityPropertyChanges", (string)null); + b.ToTable("AbpEntityPropertyChanges"); }); modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => @@ -331,7 +328,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("IsAbandoned", "NextTryTime"); - b.ToTable("AbpBackgroundJobs", (string)null); + b.ToTable("AbpBackgroundJobs"); }); modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => @@ -360,16 +357,15 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpFeatureValues", (string)null); + b.ToTable("AbpFeatureValues"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") @@ -410,12 +406,13 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("AbpClaimTypes", (string)null); + b.ToTable("AbpClaimTypes"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("SourceTenantId") @@ -436,12 +433,13 @@ namespace MyCompanyName.MyProjectName.Migrations .IsUnique() .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); - b.ToTable("AbpLinkUsers", (string)null); + b.ToTable("AbpLinkUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") @@ -484,7 +482,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("NormalizedName"); - b.ToTable("AbpRoles", (string)null); + b.ToTable("AbpRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => @@ -512,12 +510,13 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId"); - b.ToTable("AbpRoleClaims", (string)null); + b.ToTable("AbpRoleClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Action") @@ -586,12 +585,13 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "UserId"); - b.ToTable("AbpSecurityLogs", (string)null); + b.ToTable("AbpSecurityLogs"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("AccessFailedCount") @@ -740,7 +740,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserName"); - b.ToTable("AbpUsers", (string)null); + b.ToTable("AbpUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => @@ -768,7 +768,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserId"); - b.ToTable("AbpUserClaims", (string)null); + b.ToTable("AbpUserClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => @@ -797,7 +797,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("LoginProvider", "ProviderKey"); - b.ToTable("AbpUserLogins", (string)null); + b.ToTable("AbpUserLogins"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => @@ -824,7 +824,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserId", "OrganizationUnitId"); - b.ToTable("AbpUserOrganizationUnits", (string)null); + b.ToTable("AbpUserOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => @@ -843,7 +843,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId", "UserId"); - b.ToTable("AbpUserRoles", (string)null); + b.ToTable("AbpUserRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => @@ -868,12 +868,13 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("UserId", "LoginProvider", "Name"); - b.ToTable("AbpUserTokens", (string)null); + b.ToTable("AbpUserTokens"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Code") @@ -941,7 +942,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("ParentId"); - b.ToTable("AbpOrganizationUnits", (string)null); + b.ToTable("AbpOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => @@ -968,7 +969,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId", "OrganizationUnitId"); - b.ToTable("AbpOrganizationUnitRoles", (string)null); + b.ToTable("AbpOrganizationUnitRoles"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => @@ -1042,7 +1043,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("IdentityServerApiResources", (string)null); + b.ToTable("IdentityServerApiResources"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => @@ -1056,7 +1057,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Type"); - b.ToTable("IdentityServerApiResourceClaims", (string)null); + b.ToTable("IdentityServerApiResourceClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => @@ -1074,7 +1075,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Key", "Value"); - b.ToTable("IdentityServerApiResourceProperties", (string)null); + b.ToTable("IdentityServerApiResourceProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => @@ -1088,7 +1089,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Scope"); - b.ToTable("IdentityServerApiResourceScopes", (string)null); + b.ToTable("IdentityServerApiResourceScopes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => @@ -1113,7 +1114,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Type", "Value"); - b.ToTable("IdentityServerApiResourceSecrets", (string)null); + b.ToTable("IdentityServerApiResourceSecrets"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => @@ -1189,7 +1190,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("IdentityServerApiScopes", (string)null); + b.ToTable("IdentityServerApiScopes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => @@ -1203,7 +1204,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiScopeId", "Type"); - b.ToTable("IdentityServerApiScopeClaims", (string)null); + b.ToTable("IdentityServerApiScopeClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => @@ -1221,7 +1222,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiScopeId", "Key", "Value"); - b.ToTable("IdentityServerApiScopeProperties", (string)null); + b.ToTable("IdentityServerApiScopeProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => @@ -1405,7 +1406,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("ClientId"); - b.ToTable("IdentityServerClients", (string)null); + b.ToTable("IdentityServerClients"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => @@ -1423,7 +1424,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Type", "Value"); - b.ToTable("IdentityServerClientClaims", (string)null); + b.ToTable("IdentityServerClientClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => @@ -1437,7 +1438,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Origin"); - b.ToTable("IdentityServerClientCorsOrigins", (string)null); + b.ToTable("IdentityServerClientCorsOrigins"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => @@ -1451,7 +1452,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "GrantType"); - b.ToTable("IdentityServerClientGrantTypes", (string)null); + b.ToTable("IdentityServerClientGrantTypes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => @@ -1465,7 +1466,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Provider"); - b.ToTable("IdentityServerClientIdPRestrictions", (string)null); + b.ToTable("IdentityServerClientIdPRestrictions"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => @@ -1479,7 +1480,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "PostLogoutRedirectUri"); - b.ToTable("IdentityServerClientPostLogoutRedirectUris", (string)null); + b.ToTable("IdentityServerClientPostLogoutRedirectUris"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => @@ -1497,7 +1498,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Key", "Value"); - b.ToTable("IdentityServerClientProperties", (string)null); + b.ToTable("IdentityServerClientProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => @@ -1511,7 +1512,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "RedirectUri"); - b.ToTable("IdentityServerClientRedirectUris", (string)null); + b.ToTable("IdentityServerClientRedirectUris"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => @@ -1525,7 +1526,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Scope"); - b.ToTable("IdentityServerClientScopes", (string)null); + b.ToTable("IdentityServerClientScopes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => @@ -1550,7 +1551,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Type", "Value"); - b.ToTable("IdentityServerClientSecrets", (string)null); + b.ToTable("IdentityServerClientSecrets"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => @@ -1622,7 +1623,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserCode"); - b.ToTable("IdentityServerDeviceFlowCodes", (string)null); + b.ToTable("IdentityServerDeviceFlowCodes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => @@ -1688,7 +1689,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("SubjectId", "SessionId", "Type"); - b.ToTable("IdentityServerPersistedGrants", (string)null); + b.ToTable("IdentityServerPersistedGrants"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => @@ -1764,7 +1765,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("IdentityServerIdentityResources", (string)null); + b.ToTable("IdentityServerIdentityResources"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => @@ -1778,7 +1779,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("IdentityResourceId", "Type"); - b.ToTable("IdentityServerIdentityResourceClaims", (string)null); + b.ToTable("IdentityServerIdentityResourceClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => @@ -1796,7 +1797,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("IdentityResourceId", "Key", "Value"); - b.ToTable("IdentityServerIdentityResourceProperties", (string)null); + b.ToTable("IdentityServerIdentityResourceProperties"); }); modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => @@ -1826,10 +1827,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpPermissionGrants", (string)null); + b.ToTable("AbpPermissionGrants"); }); modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => @@ -1858,16 +1858,15 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpSettings", (string)null); + b.ToTable("AbpSettings"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") @@ -1919,7 +1918,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("Name"); - b.ToTable("AbpTenants", (string)null); + b.ToTable("AbpTenants"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => @@ -1938,7 +1937,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("TenantId", "Name"); - b.ToTable("AbpTenantConnectionStrings", (string)null); + b.ToTable("AbpTenantConnectionStrings"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20211102025718_Initial.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20210909052638_Initial.cs similarity index 99% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20211102025718_Initial.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20210909052638_Initial.cs index f3daa492c1..8e2d7527d5 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20211102025718_Initial.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20210909052638_Initial.cs @@ -1,8 +1,6 @@ using System; using Microsoft.EntityFrameworkCore.Migrations; -#nullable disable - namespace MyCompanyName.MyProjectName.Migrations { public partial class Initial : Migration @@ -138,7 +136,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", column: x => x.ParentId, principalTable: "AbpOrganizationUnits", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( @@ -1074,9 +1073,7 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.CreateIndex( name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true, - filter: "[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", @@ -1103,8 +1100,7 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.CreateIndex( name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", table: "AbpPermissionGrants", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true); + columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpRoleClaims_RoleId", @@ -1139,9 +1135,7 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.CreateIndex( name: "IX_AbpSettings_Name_ProviderName_ProviderKey", table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true, - filter: "[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpTenants_Name", diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/MyProjectNameDbContextModelSnapshot.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/MyProjectNameDbContextModelSnapshot.cs index 11ceb3dbb2..928c1b96eb 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/MyProjectNameDbContextModelSnapshot.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/MyProjectNameDbContextModelSnapshot.cs @@ -7,8 +7,6 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using MyCompanyName.MyProjectName.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; -#nullable disable - namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(MyProjectNameDbContext))] @@ -19,10 +17,9 @@ namespace MyCompanyName.MyProjectName.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.0-rc.2.21480.5") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.9") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -129,7 +126,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "UserId", "ExecutionTime"); - b.ToTable("AbpAuditLogs", (string)null); + b.ToTable("AbpAuditLogs"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => @@ -179,7 +176,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - b.ToTable("AbpAuditLogActions", (string)null); + b.ToTable("AbpAuditLogActions"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => @@ -229,7 +226,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - b.ToTable("AbpEntityChanges", (string)null); + b.ToTable("AbpEntityChanges"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => @@ -271,7 +268,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("EntityChangeId"); - b.ToTable("AbpEntityPropertyChanges", (string)null); + b.ToTable("AbpEntityPropertyChanges"); }); modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b => @@ -329,7 +326,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("IsAbandoned", "NextTryTime"); - b.ToTable("AbpBackgroundJobs", (string)null); + b.ToTable("AbpBackgroundJobs"); }); modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => @@ -358,16 +355,15 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpFeatureValues", (string)null); + b.ToTable("AbpFeatureValues"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") @@ -408,12 +404,13 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("AbpClaimTypes", (string)null); + b.ToTable("AbpClaimTypes"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("SourceTenantId") @@ -434,12 +431,13 @@ namespace MyCompanyName.MyProjectName.Migrations .IsUnique() .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); - b.ToTable("AbpLinkUsers", (string)null); + b.ToTable("AbpLinkUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") @@ -482,7 +480,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("NormalizedName"); - b.ToTable("AbpRoles", (string)null); + b.ToTable("AbpRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => @@ -510,12 +508,13 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId"); - b.ToTable("AbpRoleClaims", (string)null); + b.ToTable("AbpRoleClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Action") @@ -584,12 +583,13 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "UserId"); - b.ToTable("AbpSecurityLogs", (string)null); + b.ToTable("AbpSecurityLogs"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("AccessFailedCount") @@ -738,7 +738,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserName"); - b.ToTable("AbpUsers", (string)null); + b.ToTable("AbpUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => @@ -766,7 +766,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserId"); - b.ToTable("AbpUserClaims", (string)null); + b.ToTable("AbpUserClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => @@ -795,7 +795,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("LoginProvider", "ProviderKey"); - b.ToTable("AbpUserLogins", (string)null); + b.ToTable("AbpUserLogins"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => @@ -822,7 +822,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserId", "OrganizationUnitId"); - b.ToTable("AbpUserOrganizationUnits", (string)null); + b.ToTable("AbpUserOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => @@ -841,7 +841,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId", "UserId"); - b.ToTable("AbpUserRoles", (string)null); + b.ToTable("AbpUserRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => @@ -866,12 +866,13 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("UserId", "LoginProvider", "Name"); - b.ToTable("AbpUserTokens", (string)null); + b.ToTable("AbpUserTokens"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("Code") @@ -939,7 +940,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("ParentId"); - b.ToTable("AbpOrganizationUnits", (string)null); + b.ToTable("AbpOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => @@ -966,7 +967,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId", "OrganizationUnitId"); - b.ToTable("AbpOrganizationUnitRoles", (string)null); + b.ToTable("AbpOrganizationUnitRoles"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => @@ -1040,7 +1041,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("IdentityServerApiResources", (string)null); + b.ToTable("IdentityServerApiResources"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => @@ -1054,7 +1055,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Type"); - b.ToTable("IdentityServerApiResourceClaims", (string)null); + b.ToTable("IdentityServerApiResourceClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => @@ -1072,7 +1073,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Key", "Value"); - b.ToTable("IdentityServerApiResourceProperties", (string)null); + b.ToTable("IdentityServerApiResourceProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => @@ -1086,7 +1087,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Scope"); - b.ToTable("IdentityServerApiResourceScopes", (string)null); + b.ToTable("IdentityServerApiResourceScopes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => @@ -1111,7 +1112,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Type", "Value"); - b.ToTable("IdentityServerApiResourceSecrets", (string)null); + b.ToTable("IdentityServerApiResourceSecrets"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => @@ -1187,7 +1188,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("IdentityServerApiScopes", (string)null); + b.ToTable("IdentityServerApiScopes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => @@ -1201,7 +1202,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiScopeId", "Type"); - b.ToTable("IdentityServerApiScopeClaims", (string)null); + b.ToTable("IdentityServerApiScopeClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => @@ -1219,7 +1220,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiScopeId", "Key", "Value"); - b.ToTable("IdentityServerApiScopeProperties", (string)null); + b.ToTable("IdentityServerApiScopeProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => @@ -1403,7 +1404,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("ClientId"); - b.ToTable("IdentityServerClients", (string)null); + b.ToTable("IdentityServerClients"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => @@ -1421,7 +1422,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Type", "Value"); - b.ToTable("IdentityServerClientClaims", (string)null); + b.ToTable("IdentityServerClientClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => @@ -1435,7 +1436,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Origin"); - b.ToTable("IdentityServerClientCorsOrigins", (string)null); + b.ToTable("IdentityServerClientCorsOrigins"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => @@ -1449,7 +1450,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "GrantType"); - b.ToTable("IdentityServerClientGrantTypes", (string)null); + b.ToTable("IdentityServerClientGrantTypes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => @@ -1463,7 +1464,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Provider"); - b.ToTable("IdentityServerClientIdPRestrictions", (string)null); + b.ToTable("IdentityServerClientIdPRestrictions"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => @@ -1477,7 +1478,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "PostLogoutRedirectUri"); - b.ToTable("IdentityServerClientPostLogoutRedirectUris", (string)null); + b.ToTable("IdentityServerClientPostLogoutRedirectUris"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => @@ -1495,7 +1496,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Key", "Value"); - b.ToTable("IdentityServerClientProperties", (string)null); + b.ToTable("IdentityServerClientProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => @@ -1509,7 +1510,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "RedirectUri"); - b.ToTable("IdentityServerClientRedirectUris", (string)null); + b.ToTable("IdentityServerClientRedirectUris"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => @@ -1523,7 +1524,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Scope"); - b.ToTable("IdentityServerClientScopes", (string)null); + b.ToTable("IdentityServerClientScopes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => @@ -1548,7 +1549,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Type", "Value"); - b.ToTable("IdentityServerClientSecrets", (string)null); + b.ToTable("IdentityServerClientSecrets"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => @@ -1620,7 +1621,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserCode"); - b.ToTable("IdentityServerDeviceFlowCodes", (string)null); + b.ToTable("IdentityServerDeviceFlowCodes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => @@ -1686,7 +1687,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("SubjectId", "SessionId", "Type"); - b.ToTable("IdentityServerPersistedGrants", (string)null); + b.ToTable("IdentityServerPersistedGrants"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => @@ -1762,7 +1763,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("IdentityServerIdentityResources", (string)null); + b.ToTable("IdentityServerIdentityResources"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => @@ -1776,7 +1777,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("IdentityResourceId", "Type"); - b.ToTable("IdentityServerIdentityResourceClaims", (string)null); + b.ToTable("IdentityServerIdentityResourceClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => @@ -1794,7 +1795,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("IdentityResourceId", "Key", "Value"); - b.ToTable("IdentityServerIdentityResourceProperties", (string)null); + b.ToTable("IdentityServerIdentityResourceProperties"); }); modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => @@ -1824,10 +1825,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpPermissionGrants", (string)null); + b.ToTable("AbpPermissionGrants"); }); modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => @@ -1856,16 +1856,15 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpSettings", (string)null); + b.ToTable("AbpSettings"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => { b.Property("Id") + .ValueGeneratedOnAdd() .HasColumnType("uniqueidentifier"); b.Property("ConcurrencyStamp") @@ -1917,7 +1916,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("Name"); - b.ToTable("AbpTenants", (string)null); + b.ToTable("AbpTenants"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => @@ -1936,7 +1935,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("TenantId", "Name"); - b.ToTable("AbpTenantConnectionStrings", (string)null); + b.ToTable("AbpTenantConnectionStrings"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20211102025808_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20210909052730_Initial.Designer.cs similarity index 95% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20211102025808_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20210909052730_Initial.Designer.cs index 524d46f5c7..8107c2dcbe 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20211102025808_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20210909052730_Initial.Designer.cs @@ -8,12 +8,10 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using MyCompanyName.MyProjectName.Blazor.Server.Host.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; -#nullable disable - namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations { [DbContext(typeof(UnifiedDbContext))] - [Migration("20211102025808_Initial")] + [Migration("20210909052730_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -21,10 +19,9 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.0-rc.2.21480.5") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.9") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -131,7 +128,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("TenantId", "UserId", "ExecutionTime"); - b.ToTable("AbpAuditLogs", (string)null); + b.ToTable("AbpAuditLogs"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => @@ -181,7 +178,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - b.ToTable("AbpAuditLogActions", (string)null); + b.ToTable("AbpAuditLogActions"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => @@ -231,7 +228,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - b.ToTable("AbpEntityChanges", (string)null); + b.ToTable("AbpEntityChanges"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => @@ -273,7 +270,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("EntityChangeId"); - b.ToTable("AbpEntityPropertyChanges", (string)null); + b.ToTable("AbpEntityPropertyChanges"); }); modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => @@ -302,11 +299,9 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpFeatureValues", (string)null); + b.ToTable("AbpFeatureValues"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => @@ -353,7 +348,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasKey("Id"); - b.ToTable("AbpClaimTypes", (string)null); + b.ToTable("AbpClaimTypes"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => @@ -380,7 +375,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations .IsUnique() .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); - b.ToTable("AbpLinkUsers", (string)null); + b.ToTable("AbpLinkUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => @@ -429,7 +424,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("NormalizedName"); - b.ToTable("AbpRoles", (string)null); + b.ToTable("AbpRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => @@ -457,7 +452,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("RoleId"); - b.ToTable("AbpRoleClaims", (string)null); + b.ToTable("AbpRoleClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => @@ -532,7 +527,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("TenantId", "UserId"); - b.ToTable("AbpSecurityLogs", (string)null); + b.ToTable("AbpSecurityLogs"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => @@ -687,7 +682,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("UserName"); - b.ToTable("AbpUsers", (string)null); + b.ToTable("AbpUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => @@ -715,7 +710,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("UserId"); - b.ToTable("AbpUserClaims", (string)null); + b.ToTable("AbpUserClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => @@ -744,7 +739,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("LoginProvider", "ProviderKey"); - b.ToTable("AbpUserLogins", (string)null); + b.ToTable("AbpUserLogins"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => @@ -771,7 +766,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("UserId", "OrganizationUnitId"); - b.ToTable("AbpUserOrganizationUnits", (string)null); + b.ToTable("AbpUserOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => @@ -790,7 +785,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("RoleId", "UserId"); - b.ToTable("AbpUserRoles", (string)null); + b.ToTable("AbpUserRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => @@ -815,7 +810,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasKey("UserId", "LoginProvider", "Name"); - b.ToTable("AbpUserTokens", (string)null); + b.ToTable("AbpUserTokens"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => @@ -889,7 +884,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("ParentId"); - b.ToTable("AbpOrganizationUnits", (string)null); + b.ToTable("AbpOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => @@ -916,7 +911,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("RoleId", "OrganizationUnitId"); - b.ToTable("AbpOrganizationUnitRoles", (string)null); + b.ToTable("AbpOrganizationUnitRoles"); }); modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => @@ -946,10 +941,9 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpPermissionGrants", (string)null); + b.ToTable("AbpPermissionGrants"); }); modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => @@ -978,11 +972,9 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpSettings", (string)null); + b.ToTable("AbpSettings"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => @@ -1040,7 +1032,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("Name"); - b.ToTable("AbpTenants", (string)null); + b.ToTable("AbpTenants"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => @@ -1059,7 +1051,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasKey("TenantId", "Name"); - b.ToTable("AbpTenantConnectionStrings", (string)null); + b.ToTable("AbpTenantConnectionStrings"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20211102025808_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20210909052730_Initial.cs similarity index 99% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20211102025808_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20210909052730_Initial.cs index 1b83395f78..0d9af49008 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20211102025808_Initial.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20210909052730_Initial.cs @@ -1,8 +1,6 @@ using System; using Microsoft.EntityFrameworkCore.Migrations; -#nullable disable - namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations { public partial class Initial : Migration @@ -117,7 +115,8 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", column: x => x.ParentId, principalTable: "AbpOrganizationUnits", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( @@ -546,9 +545,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations migrationBuilder.CreateIndex( name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true, - filter: "[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", @@ -575,8 +572,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations migrationBuilder.CreateIndex( name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", table: "AbpPermissionGrants", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true); + columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpRoleClaims_RoleId", @@ -611,9 +607,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations migrationBuilder.CreateIndex( name: "IX_AbpSettings_Name_ProviderName_ProviderKey", table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true, - filter: "[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpTenants_Name", diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/UnifiedDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/UnifiedDbContextModelSnapshot.cs index af4b49c54c..c394d8c737 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/UnifiedDbContextModelSnapshot.cs @@ -7,8 +7,6 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using MyCompanyName.MyProjectName.Blazor.Server.Host.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; -#nullable disable - namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations { [DbContext(typeof(UnifiedDbContext))] @@ -19,10 +17,9 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.0-rc.2.21480.5") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.9") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -129,7 +126,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("TenantId", "UserId", "ExecutionTime"); - b.ToTable("AbpAuditLogs", (string)null); + b.ToTable("AbpAuditLogs"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => @@ -179,7 +176,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - b.ToTable("AbpAuditLogActions", (string)null); + b.ToTable("AbpAuditLogActions"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => @@ -229,7 +226,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - b.ToTable("AbpEntityChanges", (string)null); + b.ToTable("AbpEntityChanges"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => @@ -271,7 +268,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("EntityChangeId"); - b.ToTable("AbpEntityPropertyChanges", (string)null); + b.ToTable("AbpEntityPropertyChanges"); }); modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => @@ -300,11 +297,9 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpFeatureValues", (string)null); + b.ToTable("AbpFeatureValues"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => @@ -351,7 +346,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasKey("Id"); - b.ToTable("AbpClaimTypes", (string)null); + b.ToTable("AbpClaimTypes"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => @@ -378,7 +373,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations .IsUnique() .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); - b.ToTable("AbpLinkUsers", (string)null); + b.ToTable("AbpLinkUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => @@ -427,7 +422,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("NormalizedName"); - b.ToTable("AbpRoles", (string)null); + b.ToTable("AbpRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => @@ -455,7 +450,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("RoleId"); - b.ToTable("AbpRoleClaims", (string)null); + b.ToTable("AbpRoleClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => @@ -530,7 +525,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("TenantId", "UserId"); - b.ToTable("AbpSecurityLogs", (string)null); + b.ToTable("AbpSecurityLogs"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => @@ -685,7 +680,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("UserName"); - b.ToTable("AbpUsers", (string)null); + b.ToTable("AbpUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => @@ -713,7 +708,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("UserId"); - b.ToTable("AbpUserClaims", (string)null); + b.ToTable("AbpUserClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => @@ -742,7 +737,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("LoginProvider", "ProviderKey"); - b.ToTable("AbpUserLogins", (string)null); + b.ToTable("AbpUserLogins"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => @@ -769,7 +764,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("UserId", "OrganizationUnitId"); - b.ToTable("AbpUserOrganizationUnits", (string)null); + b.ToTable("AbpUserOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => @@ -788,7 +783,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("RoleId", "UserId"); - b.ToTable("AbpUserRoles", (string)null); + b.ToTable("AbpUserRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => @@ -813,7 +808,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasKey("UserId", "LoginProvider", "Name"); - b.ToTable("AbpUserTokens", (string)null); + b.ToTable("AbpUserTokens"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => @@ -887,7 +882,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("ParentId"); - b.ToTable("AbpOrganizationUnits", (string)null); + b.ToTable("AbpOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => @@ -914,7 +909,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("RoleId", "OrganizationUnitId"); - b.ToTable("AbpOrganizationUnitRoles", (string)null); + b.ToTable("AbpOrganizationUnitRoles"); }); modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => @@ -944,10 +939,9 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpPermissionGrants", (string)null); + b.ToTable("AbpPermissionGrants"); }); modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => @@ -976,11 +970,9 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpSettings", (string)null); + b.ToTable("AbpSettings"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => @@ -1038,7 +1030,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasIndex("Name"); - b.ToTable("AbpTenants", (string)null); + b.ToTable("AbpTenants"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => @@ -1057,7 +1049,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations b.HasKey("TenantId", "Name"); - b.ToTable("AbpTenantConnectionStrings", (string)null); + b.ToTable("AbpTenantConnectionStrings"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20211102025809_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20210909052712_Initial.Designer.cs similarity index 96% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20211102025809_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20210909052712_Initial.Designer.cs index 990bd232eb..b9edb3b1a7 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20211102025809_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20210909052712_Initial.Designer.cs @@ -8,12 +8,10 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using MyCompanyName.MyProjectName.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; -#nullable disable - namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(IdentityServerHostMigrationsDbContext))] - [Migration("20211102025809_Initial")] + [Migration("20210909052712_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -21,10 +19,9 @@ namespace MyCompanyName.MyProjectName.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.0-rc.2.21480.5") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.9") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -131,7 +128,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "UserId", "ExecutionTime"); - b.ToTable("AbpAuditLogs", (string)null); + b.ToTable("AbpAuditLogs"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => @@ -181,7 +178,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - b.ToTable("AbpAuditLogActions", (string)null); + b.ToTable("AbpAuditLogActions"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => @@ -231,7 +228,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - b.ToTable("AbpEntityChanges", (string)null); + b.ToTable("AbpEntityChanges"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => @@ -273,7 +270,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("EntityChangeId"); - b.ToTable("AbpEntityPropertyChanges", (string)null); + b.ToTable("AbpEntityPropertyChanges"); }); modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => @@ -302,11 +299,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpFeatureValues", (string)null); + b.ToTable("AbpFeatureValues"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => @@ -353,7 +348,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("AbpClaimTypes", (string)null); + b.ToTable("AbpClaimTypes"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => @@ -380,7 +375,7 @@ namespace MyCompanyName.MyProjectName.Migrations .IsUnique() .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); - b.ToTable("AbpLinkUsers", (string)null); + b.ToTable("AbpLinkUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => @@ -429,7 +424,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("NormalizedName"); - b.ToTable("AbpRoles", (string)null); + b.ToTable("AbpRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => @@ -457,7 +452,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId"); - b.ToTable("AbpRoleClaims", (string)null); + b.ToTable("AbpRoleClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => @@ -532,7 +527,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "UserId"); - b.ToTable("AbpSecurityLogs", (string)null); + b.ToTable("AbpSecurityLogs"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => @@ -687,7 +682,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserName"); - b.ToTable("AbpUsers", (string)null); + b.ToTable("AbpUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => @@ -715,7 +710,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserId"); - b.ToTable("AbpUserClaims", (string)null); + b.ToTable("AbpUserClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => @@ -744,7 +739,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("LoginProvider", "ProviderKey"); - b.ToTable("AbpUserLogins", (string)null); + b.ToTable("AbpUserLogins"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => @@ -771,7 +766,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserId", "OrganizationUnitId"); - b.ToTable("AbpUserOrganizationUnits", (string)null); + b.ToTable("AbpUserOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => @@ -790,7 +785,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId", "UserId"); - b.ToTable("AbpUserRoles", (string)null); + b.ToTable("AbpUserRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => @@ -815,7 +810,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("UserId", "LoginProvider", "Name"); - b.ToTable("AbpUserTokens", (string)null); + b.ToTable("AbpUserTokens"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => @@ -889,7 +884,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("ParentId"); - b.ToTable("AbpOrganizationUnits", (string)null); + b.ToTable("AbpOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => @@ -916,7 +911,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId", "OrganizationUnitId"); - b.ToTable("AbpOrganizationUnitRoles", (string)null); + b.ToTable("AbpOrganizationUnitRoles"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => @@ -990,7 +985,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("IdentityServerApiResources", (string)null); + b.ToTable("IdentityServerApiResources"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => @@ -1004,7 +999,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Type"); - b.ToTable("IdentityServerApiResourceClaims", (string)null); + b.ToTable("IdentityServerApiResourceClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => @@ -1022,7 +1017,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Key", "Value"); - b.ToTable("IdentityServerApiResourceProperties", (string)null); + b.ToTable("IdentityServerApiResourceProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => @@ -1036,7 +1031,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Scope"); - b.ToTable("IdentityServerApiResourceScopes", (string)null); + b.ToTable("IdentityServerApiResourceScopes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => @@ -1061,7 +1056,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Type", "Value"); - b.ToTable("IdentityServerApiResourceSecrets", (string)null); + b.ToTable("IdentityServerApiResourceSecrets"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => @@ -1137,7 +1132,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("IdentityServerApiScopes", (string)null); + b.ToTable("IdentityServerApiScopes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => @@ -1151,7 +1146,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiScopeId", "Type"); - b.ToTable("IdentityServerApiScopeClaims", (string)null); + b.ToTable("IdentityServerApiScopeClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => @@ -1169,7 +1164,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiScopeId", "Key", "Value"); - b.ToTable("IdentityServerApiScopeProperties", (string)null); + b.ToTable("IdentityServerApiScopeProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => @@ -1353,7 +1348,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("ClientId"); - b.ToTable("IdentityServerClients", (string)null); + b.ToTable("IdentityServerClients"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => @@ -1371,7 +1366,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Type", "Value"); - b.ToTable("IdentityServerClientClaims", (string)null); + b.ToTable("IdentityServerClientClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => @@ -1385,7 +1380,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Origin"); - b.ToTable("IdentityServerClientCorsOrigins", (string)null); + b.ToTable("IdentityServerClientCorsOrigins"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => @@ -1399,7 +1394,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "GrantType"); - b.ToTable("IdentityServerClientGrantTypes", (string)null); + b.ToTable("IdentityServerClientGrantTypes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => @@ -1413,7 +1408,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Provider"); - b.ToTable("IdentityServerClientIdPRestrictions", (string)null); + b.ToTable("IdentityServerClientIdPRestrictions"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => @@ -1427,7 +1422,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "PostLogoutRedirectUri"); - b.ToTable("IdentityServerClientPostLogoutRedirectUris", (string)null); + b.ToTable("IdentityServerClientPostLogoutRedirectUris"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => @@ -1445,7 +1440,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Key", "Value"); - b.ToTable("IdentityServerClientProperties", (string)null); + b.ToTable("IdentityServerClientProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => @@ -1459,7 +1454,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "RedirectUri"); - b.ToTable("IdentityServerClientRedirectUris", (string)null); + b.ToTable("IdentityServerClientRedirectUris"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => @@ -1473,7 +1468,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Scope"); - b.ToTable("IdentityServerClientScopes", (string)null); + b.ToTable("IdentityServerClientScopes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => @@ -1498,7 +1493,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Type", "Value"); - b.ToTable("IdentityServerClientSecrets", (string)null); + b.ToTable("IdentityServerClientSecrets"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => @@ -1570,7 +1565,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserCode"); - b.ToTable("IdentityServerDeviceFlowCodes", (string)null); + b.ToTable("IdentityServerDeviceFlowCodes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => @@ -1636,7 +1631,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("SubjectId", "SessionId", "Type"); - b.ToTable("IdentityServerPersistedGrants", (string)null); + b.ToTable("IdentityServerPersistedGrants"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => @@ -1712,7 +1707,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("IdentityServerIdentityResources", (string)null); + b.ToTable("IdentityServerIdentityResources"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => @@ -1726,7 +1721,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("IdentityResourceId", "Type"); - b.ToTable("IdentityServerIdentityResourceClaims", (string)null); + b.ToTable("IdentityServerIdentityResourceClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => @@ -1744,7 +1739,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("IdentityResourceId", "Key", "Value"); - b.ToTable("IdentityServerIdentityResourceProperties", (string)null); + b.ToTable("IdentityServerIdentityResourceProperties"); }); modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => @@ -1774,10 +1769,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpPermissionGrants", (string)null); + b.ToTable("AbpPermissionGrants"); }); modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => @@ -1806,11 +1800,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpSettings", (string)null); + b.ToTable("AbpSettings"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => @@ -1868,7 +1860,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("Name"); - b.ToTable("AbpTenants", (string)null); + b.ToTable("AbpTenants"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => @@ -1887,7 +1879,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("TenantId", "Name"); - b.ToTable("AbpTenantConnectionStrings", (string)null); + b.ToTable("AbpTenantConnectionStrings"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20211102025809_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20210909052712_Initial.cs similarity index 99% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20211102025809_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20210909052712_Initial.cs index 4e33b375d0..5333a6a34e 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20211102025809_Initial.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/20210909052712_Initial.cs @@ -1,8 +1,6 @@ using System; using Microsoft.EntityFrameworkCore.Migrations; -#nullable disable - namespace MyCompanyName.MyProjectName.Migrations { public partial class Initial : Migration @@ -117,7 +115,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", column: x => x.ParentId, principalTable: "AbpOrganizationUnits", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( @@ -1048,9 +1047,7 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.CreateIndex( name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true, - filter: "[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", @@ -1077,8 +1074,7 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.CreateIndex( name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", table: "AbpPermissionGrants", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true); + columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpRoleClaims_RoleId", @@ -1113,9 +1109,7 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.CreateIndex( name: "IX_AbpSettings_Name_ProviderName_ProviderKey", table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true, - filter: "[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpTenants_Name", diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs index 86f2c91a5c..aa156c5d53 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/Migrations/IdentityServerHostMigrationsDbContextModelSnapshot.cs @@ -7,8 +7,6 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using MyCompanyName.MyProjectName.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; -#nullable disable - namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(IdentityServerHostMigrationsDbContext))] @@ -19,10 +17,9 @@ namespace MyCompanyName.MyProjectName.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.0-rc.2.21480.5") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.9") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -129,7 +126,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "UserId", "ExecutionTime"); - b.ToTable("AbpAuditLogs", (string)null); + b.ToTable("AbpAuditLogs"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => @@ -179,7 +176,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - b.ToTable("AbpAuditLogActions", (string)null); + b.ToTable("AbpAuditLogActions"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => @@ -229,7 +226,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - b.ToTable("AbpEntityChanges", (string)null); + b.ToTable("AbpEntityChanges"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => @@ -271,7 +268,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("EntityChangeId"); - b.ToTable("AbpEntityPropertyChanges", (string)null); + b.ToTable("AbpEntityPropertyChanges"); }); modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => @@ -300,11 +297,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpFeatureValues", (string)null); + b.ToTable("AbpFeatureValues"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => @@ -351,7 +346,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("AbpClaimTypes", (string)null); + b.ToTable("AbpClaimTypes"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => @@ -378,7 +373,7 @@ namespace MyCompanyName.MyProjectName.Migrations .IsUnique() .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); - b.ToTable("AbpLinkUsers", (string)null); + b.ToTable("AbpLinkUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => @@ -427,7 +422,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("NormalizedName"); - b.ToTable("AbpRoles", (string)null); + b.ToTable("AbpRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => @@ -455,7 +450,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId"); - b.ToTable("AbpRoleClaims", (string)null); + b.ToTable("AbpRoleClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => @@ -530,7 +525,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "UserId"); - b.ToTable("AbpSecurityLogs", (string)null); + b.ToTable("AbpSecurityLogs"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => @@ -685,7 +680,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserName"); - b.ToTable("AbpUsers", (string)null); + b.ToTable("AbpUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => @@ -713,7 +708,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserId"); - b.ToTable("AbpUserClaims", (string)null); + b.ToTable("AbpUserClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => @@ -742,7 +737,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("LoginProvider", "ProviderKey"); - b.ToTable("AbpUserLogins", (string)null); + b.ToTable("AbpUserLogins"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => @@ -769,7 +764,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserId", "OrganizationUnitId"); - b.ToTable("AbpUserOrganizationUnits", (string)null); + b.ToTable("AbpUserOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => @@ -788,7 +783,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId", "UserId"); - b.ToTable("AbpUserRoles", (string)null); + b.ToTable("AbpUserRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => @@ -813,7 +808,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("UserId", "LoginProvider", "Name"); - b.ToTable("AbpUserTokens", (string)null); + b.ToTable("AbpUserTokens"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => @@ -887,7 +882,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("ParentId"); - b.ToTable("AbpOrganizationUnits", (string)null); + b.ToTable("AbpOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => @@ -914,7 +909,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId", "OrganizationUnitId"); - b.ToTable("AbpOrganizationUnitRoles", (string)null); + b.ToTable("AbpOrganizationUnitRoles"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b => @@ -988,7 +983,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("IdentityServerApiResources", (string)null); + b.ToTable("IdentityServerApiResources"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b => @@ -1002,7 +997,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Type"); - b.ToTable("IdentityServerApiResourceClaims", (string)null); + b.ToTable("IdentityServerApiResourceClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b => @@ -1020,7 +1015,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Key", "Value"); - b.ToTable("IdentityServerApiResourceProperties", (string)null); + b.ToTable("IdentityServerApiResourceProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceScope", b => @@ -1034,7 +1029,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Scope"); - b.ToTable("IdentityServerApiResourceScopes", (string)null); + b.ToTable("IdentityServerApiResourceScopes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceSecret", b => @@ -1059,7 +1054,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiResourceId", "Type", "Value"); - b.ToTable("IdentityServerApiResourceSecrets", (string)null); + b.ToTable("IdentityServerApiResourceSecrets"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScope", b => @@ -1135,7 +1130,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("IdentityServerApiScopes", (string)null); + b.ToTable("IdentityServerApiScopes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeClaim", b => @@ -1149,7 +1144,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiScopeId", "Type"); - b.ToTable("IdentityServerApiScopeClaims", (string)null); + b.ToTable("IdentityServerApiScopeClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiScopeProperty", b => @@ -1167,7 +1162,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ApiScopeId", "Key", "Value"); - b.ToTable("IdentityServerApiScopeProperties", (string)null); + b.ToTable("IdentityServerApiScopeProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b => @@ -1351,7 +1346,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("ClientId"); - b.ToTable("IdentityServerClients", (string)null); + b.ToTable("IdentityServerClients"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b => @@ -1369,7 +1364,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Type", "Value"); - b.ToTable("IdentityServerClientClaims", (string)null); + b.ToTable("IdentityServerClientClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b => @@ -1383,7 +1378,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Origin"); - b.ToTable("IdentityServerClientCorsOrigins", (string)null); + b.ToTable("IdentityServerClientCorsOrigins"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b => @@ -1397,7 +1392,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "GrantType"); - b.ToTable("IdentityServerClientGrantTypes", (string)null); + b.ToTable("IdentityServerClientGrantTypes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b => @@ -1411,7 +1406,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Provider"); - b.ToTable("IdentityServerClientIdPRestrictions", (string)null); + b.ToTable("IdentityServerClientIdPRestrictions"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b => @@ -1425,7 +1420,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "PostLogoutRedirectUri"); - b.ToTable("IdentityServerClientPostLogoutRedirectUris", (string)null); + b.ToTable("IdentityServerClientPostLogoutRedirectUris"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b => @@ -1443,7 +1438,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Key", "Value"); - b.ToTable("IdentityServerClientProperties", (string)null); + b.ToTable("IdentityServerClientProperties"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b => @@ -1457,7 +1452,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "RedirectUri"); - b.ToTable("IdentityServerClientRedirectUris", (string)null); + b.ToTable("IdentityServerClientRedirectUris"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b => @@ -1471,7 +1466,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Scope"); - b.ToTable("IdentityServerClientScopes", (string)null); + b.ToTable("IdentityServerClientScopes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b => @@ -1496,7 +1491,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("ClientId", "Type", "Value"); - b.ToTable("IdentityServerClientSecrets", (string)null); + b.ToTable("IdentityServerClientSecrets"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Devices.DeviceFlowCodes", b => @@ -1568,7 +1563,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserCode"); - b.ToTable("IdentityServerDeviceFlowCodes", (string)null); + b.ToTable("IdentityServerDeviceFlowCodes"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b => @@ -1634,7 +1629,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("SubjectId", "SessionId", "Type"); - b.ToTable("IdentityServerPersistedGrants", (string)null); + b.ToTable("IdentityServerPersistedGrants"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b => @@ -1710,7 +1705,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("IdentityServerIdentityResources", (string)null); + b.ToTable("IdentityServerIdentityResources"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceClaim", b => @@ -1724,7 +1719,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("IdentityResourceId", "Type"); - b.ToTable("IdentityServerIdentityResourceClaims", (string)null); + b.ToTable("IdentityServerIdentityResourceClaims"); }); modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResourceProperty", b => @@ -1742,7 +1737,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("IdentityResourceId", "Key", "Value"); - b.ToTable("IdentityServerIdentityResourceProperties", (string)null); + b.ToTable("IdentityServerIdentityResourceProperties"); }); modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => @@ -1772,10 +1767,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpPermissionGrants", (string)null); + b.ToTable("AbpPermissionGrants"); }); modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => @@ -1804,11 +1798,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpSettings", (string)null); + b.ToTable("AbpSettings"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => @@ -1866,7 +1858,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("Name"); - b.ToTable("AbpTenants", (string)null); + b.ToTable("AbpTenants"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => @@ -1885,7 +1877,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("TenantId", "Name"); - b.ToTable("AbpTenantConnectionStrings", (string)null); + b.ToTable("AbpTenantConnectionStrings"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20211102025817_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20210909052706_Initial.Designer.cs similarity index 95% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20211102025817_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20210909052706_Initial.Designer.cs index d2ceaeab71..993934aedb 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20211102025817_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20210909052706_Initial.Designer.cs @@ -8,12 +8,10 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using MyCompanyName.MyProjectName.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; -#nullable disable - namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(UnifiedDbContext))] - [Migration("20211102025817_Initial")] + [Migration("20210909052706_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -21,10 +19,9 @@ namespace MyCompanyName.MyProjectName.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.0-rc.2.21480.5") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.9") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -131,7 +128,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "UserId", "ExecutionTime"); - b.ToTable("AbpAuditLogs", (string)null); + b.ToTable("AbpAuditLogs"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => @@ -181,7 +178,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - b.ToTable("AbpAuditLogActions", (string)null); + b.ToTable("AbpAuditLogActions"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => @@ -231,7 +228,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - b.ToTable("AbpEntityChanges", (string)null); + b.ToTable("AbpEntityChanges"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => @@ -273,7 +270,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("EntityChangeId"); - b.ToTable("AbpEntityPropertyChanges", (string)null); + b.ToTable("AbpEntityPropertyChanges"); }); modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => @@ -302,11 +299,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpFeatureValues", (string)null); + b.ToTable("AbpFeatureValues"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => @@ -353,7 +348,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("AbpClaimTypes", (string)null); + b.ToTable("AbpClaimTypes"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => @@ -380,7 +375,7 @@ namespace MyCompanyName.MyProjectName.Migrations .IsUnique() .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); - b.ToTable("AbpLinkUsers", (string)null); + b.ToTable("AbpLinkUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => @@ -429,7 +424,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("NormalizedName"); - b.ToTable("AbpRoles", (string)null); + b.ToTable("AbpRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => @@ -457,7 +452,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId"); - b.ToTable("AbpRoleClaims", (string)null); + b.ToTable("AbpRoleClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => @@ -532,7 +527,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "UserId"); - b.ToTable("AbpSecurityLogs", (string)null); + b.ToTable("AbpSecurityLogs"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => @@ -687,7 +682,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserName"); - b.ToTable("AbpUsers", (string)null); + b.ToTable("AbpUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => @@ -715,7 +710,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserId"); - b.ToTable("AbpUserClaims", (string)null); + b.ToTable("AbpUserClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => @@ -744,7 +739,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("LoginProvider", "ProviderKey"); - b.ToTable("AbpUserLogins", (string)null); + b.ToTable("AbpUserLogins"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => @@ -771,7 +766,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserId", "OrganizationUnitId"); - b.ToTable("AbpUserOrganizationUnits", (string)null); + b.ToTable("AbpUserOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => @@ -790,7 +785,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId", "UserId"); - b.ToTable("AbpUserRoles", (string)null); + b.ToTable("AbpUserRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => @@ -815,7 +810,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("UserId", "LoginProvider", "Name"); - b.ToTable("AbpUserTokens", (string)null); + b.ToTable("AbpUserTokens"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => @@ -889,7 +884,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("ParentId"); - b.ToTable("AbpOrganizationUnits", (string)null); + b.ToTable("AbpOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => @@ -916,7 +911,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId", "OrganizationUnitId"); - b.ToTable("AbpOrganizationUnitRoles", (string)null); + b.ToTable("AbpOrganizationUnitRoles"); }); modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => @@ -946,10 +941,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpPermissionGrants", (string)null); + b.ToTable("AbpPermissionGrants"); }); modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => @@ -978,11 +972,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpSettings", (string)null); + b.ToTable("AbpSettings"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => @@ -1040,7 +1032,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("Name"); - b.ToTable("AbpTenants", (string)null); + b.ToTable("AbpTenants"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => @@ -1059,7 +1051,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("TenantId", "Name"); - b.ToTable("AbpTenantConnectionStrings", (string)null); + b.ToTable("AbpTenantConnectionStrings"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20211102025817_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20210909052706_Initial.cs similarity index 99% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20211102025817_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20210909052706_Initial.cs index d5f00da8da..b7465b0dcb 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20211102025817_Initial.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20210909052706_Initial.cs @@ -1,8 +1,6 @@ using System; using Microsoft.EntityFrameworkCore.Migrations; -#nullable disable - namespace MyCompanyName.MyProjectName.Migrations { public partial class Initial : Migration @@ -117,7 +115,8 @@ namespace MyCompanyName.MyProjectName.Migrations name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", column: x => x.ParentId, principalTable: "AbpOrganizationUnits", - principalColumn: "Id"); + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateTable( @@ -546,9 +545,7 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.CreateIndex( name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", table: "AbpFeatureValues", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true, - filter: "[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", @@ -575,8 +572,7 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.CreateIndex( name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", table: "AbpPermissionGrants", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true); + columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpRoleClaims_RoleId", @@ -611,9 +607,7 @@ namespace MyCompanyName.MyProjectName.Migrations migrationBuilder.CreateIndex( name: "IX_AbpSettings_Name_ProviderName_ProviderKey", table: "AbpSettings", - columns: new[] { "Name", "ProviderName", "ProviderKey" }, - unique: true, - filter: "[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + columns: new[] { "Name", "ProviderName", "ProviderKey" }); migrationBuilder.CreateIndex( name: "IX_AbpTenants_Name", diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index 2bb98b98dc..472749a2a0 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs @@ -7,8 +7,6 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using MyCompanyName.MyProjectName.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore; -#nullable disable - namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(UnifiedDbContext))] @@ -19,10 +17,9 @@ namespace MyCompanyName.MyProjectName.Migrations #pragma warning disable 612, 618 modelBuilder .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.0-rc.2.21480.5") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("ProductVersion", "5.0.9") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { @@ -129,7 +126,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "UserId", "ExecutionTime"); - b.ToTable("AbpAuditLogs", (string)null); + b.ToTable("AbpAuditLogs"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => @@ -179,7 +176,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); - b.ToTable("AbpAuditLogActions", (string)null); + b.ToTable("AbpAuditLogActions"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => @@ -229,7 +226,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); - b.ToTable("AbpEntityChanges", (string)null); + b.ToTable("AbpEntityChanges"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => @@ -271,7 +268,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("EntityChangeId"); - b.ToTable("AbpEntityPropertyChanges", (string)null); + b.ToTable("AbpEntityPropertyChanges"); }); modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b => @@ -300,11 +297,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpFeatureValues", (string)null); + b.ToTable("AbpFeatureValues"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => @@ -351,7 +346,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.ToTable("AbpClaimTypes", (string)null); + b.ToTable("AbpClaimTypes"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b => @@ -378,7 +373,7 @@ namespace MyCompanyName.MyProjectName.Migrations .IsUnique() .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); - b.ToTable("AbpLinkUsers", (string)null); + b.ToTable("AbpLinkUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => @@ -427,7 +422,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("NormalizedName"); - b.ToTable("AbpRoles", (string)null); + b.ToTable("AbpRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => @@ -455,7 +450,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId"); - b.ToTable("AbpRoleClaims", (string)null); + b.ToTable("AbpRoleClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b => @@ -530,7 +525,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("TenantId", "UserId"); - b.ToTable("AbpSecurityLogs", (string)null); + b.ToTable("AbpSecurityLogs"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => @@ -685,7 +680,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserName"); - b.ToTable("AbpUsers", (string)null); + b.ToTable("AbpUsers"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => @@ -713,7 +708,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserId"); - b.ToTable("AbpUserClaims", (string)null); + b.ToTable("AbpUserClaims"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => @@ -742,7 +737,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("LoginProvider", "ProviderKey"); - b.ToTable("AbpUserLogins", (string)null); + b.ToTable("AbpUserLogins"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b => @@ -769,7 +764,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("UserId", "OrganizationUnitId"); - b.ToTable("AbpUserOrganizationUnits", (string)null); + b.ToTable("AbpUserOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => @@ -788,7 +783,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId", "UserId"); - b.ToTable("AbpUserRoles", (string)null); + b.ToTable("AbpUserRoles"); }); modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => @@ -813,7 +808,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("UserId", "LoginProvider", "Name"); - b.ToTable("AbpUserTokens", (string)null); + b.ToTable("AbpUserTokens"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b => @@ -887,7 +882,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("ParentId"); - b.ToTable("AbpOrganizationUnits", (string)null); + b.ToTable("AbpOrganizationUnits"); }); modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b => @@ -914,7 +909,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("RoleId", "OrganizationUnitId"); - b.ToTable("AbpOrganizationUnitRoles", (string)null); + b.ToTable("AbpOrganizationUnitRoles"); }); modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => @@ -944,10 +939,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique(); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpPermissionGrants", (string)null); + b.ToTable("AbpPermissionGrants"); }); modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => @@ -976,11 +970,9 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("Id"); - b.HasIndex("Name", "ProviderName", "ProviderKey") - .IsUnique() - .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); + b.HasIndex("Name", "ProviderName", "ProviderKey"); - b.ToTable("AbpSettings", (string)null); + b.ToTable("AbpSettings"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => @@ -1038,7 +1030,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasIndex("Name"); - b.ToTable("AbpTenants", (string)null); + b.ToTable("AbpTenants"); }); modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => @@ -1057,7 +1049,7 @@ namespace MyCompanyName.MyProjectName.Migrations b.HasKey("TenantId", "Name"); - b.ToTable("AbpTenantConnectionStrings", (string)null); + b.ToTable("AbpTenantConnectionStrings"); }); modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>