Browse Source

feat: 支持多租户

example
Hanpaopao 2 years ago
parent
commit
4468d31125
  1. 14
      aspnet-core/Directory.Build.Lion.targets
  2. 2
      aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json
  3. 2777
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241220091725_1.0.2.Designer.cs
  4. 29
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241220091725_1.0.2.cs
  5. 3
      aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs

14
aspnet-core/Directory.Build.Lion.targets

@ -1,11 +1,11 @@
<Project>
<ItemGroup>
<PackageReference Update="Lion.AbpPro.CodeManagement.Domain" Version="1.1.6"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Domain.Shared" Version="1.1.6"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Application.Contracts" Version="1.1.6"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Application" Version="1.1.6"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.HttpApi" Version="1.1.6"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.HttpApi.Client" Version="1.1.6"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.EntityFrameworkCore" Version="1.1.6"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Domain" Version="1.1.9"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Domain.Shared" Version="1.1.9"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Application.Contracts" Version="1.1.9"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.Application" Version="1.1.9"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.HttpApi" Version="1.1.9"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.HttpApi.Client" Version="1.1.9"/>
<PackageReference Update="Lion.AbpPro.CodeManagement.EntityFrameworkCore" Version="1.1.9"/>
</ItemGroup>
</Project>

2
aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json

@ -34,7 +34,7 @@
"CorsOrigins": "https://*.AbpPro.com,http://localhost:4200,http://localhost:3100"
},
"ConnectionStrings": {
"Default": "Data Source=182.43.18.151;Port=3306;Database=abpvnextprodemo1;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true",
"Default": "Data Source=182.43.18.151;Port=3306;Database=abpvnextpro;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true",
// 可以单独设置代码模块的数据库连接,如果未设置,使用default
//"CodeManagement": "Data Source=182.43.18.151;Database=abpvnextpro1;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
},

2777
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241220091725_1.0.2.Designer.cs

File diff suppressed because it is too large

29
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/20241220091725_1.0.2.cs

@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Lion.AbpPro.Migrations
{
/// <inheritdoc />
public partial class _102 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "SupportTenant",
table: "AbpProProjects",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "SupportTenant",
table: "AbpProProjects");
}
}
}

3
aspnet-core/services/src/Lion.AbpPro.EntityFrameworkCore/Migrations/AbpProDbContextModelSnapshot.cs

@ -530,6 +530,9 @@ namespace Lion.AbpPro.Migrations
.HasMaxLength(512)
.HasColumnType("varchar(512)");
b.Property<bool>("SupportTenant")
.HasColumnType("tinyint(1)");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");

Loading…
Cancel
Save