Browse Source
Merge pull request #6217 from abpframework/liangshiwei/mysql-net5
Upgrade Pomelo.EntityFrameworkCore.MySql to NET 5
pull/6228/head
maliming
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
8 additions and
4 deletions
-
framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj
-
framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextMySQLExtensions.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs
-
nupkg/common.ps1
|
|
|
@ -19,7 +19,7 @@ |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.1" /> |
|
|
|
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.0-alpha.2" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
</Project> |
|
|
|
|
|
|
|
@ -14,11 +14,11 @@ namespace Volo.Abp.EntityFrameworkCore |
|
|
|
{ |
|
|
|
if (context.ExistingConnection != null) |
|
|
|
{ |
|
|
|
return context.DbContextOptions.UseMySql(context.ExistingConnection, mySQLOptionsAction); |
|
|
|
return context.DbContextOptions.UseMySql(context.ExistingConnection, ServerVersion.AutoDetect(context.ConnectionString), mySQLOptionsAction); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
return context.DbContextOptions.UseMySql(context.ConnectionString, mySQLOptionsAction); |
|
|
|
return context.DbContextOptions.UseMySql(context.ConnectionString, ServerVersion.AutoDetect(context.ConnectionString), mySQLOptionsAction); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -176,6 +176,10 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore |
|
|
|
b.HasKey(x => new {x.ClientId, x.Key, x.Value}); |
|
|
|
|
|
|
|
b.Property(x => x.Key).HasMaxLength(ClientPropertyConsts.KeyMaxLength).IsRequired(); |
|
|
|
if (IsDatabaseProvider(builder, options, EfCoreDatabaseProvider.MySql)) |
|
|
|
{ |
|
|
|
ClientPropertyConsts.ValueMaxLength = 300; |
|
|
|
} |
|
|
|
b.Property(x => x.Value).HasMaxLength(ClientPropertyConsts.ValueMaxLength).IsRequired(); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
@ -85,7 +85,7 @@ $projects = ( |
|
|
|
"framework/src/Volo.Abp.Ddd.Domain", |
|
|
|
"framework/src/Volo.Abp.Emailing", |
|
|
|
"framework/src/Volo.Abp.EntityFrameworkCore", |
|
|
|
# "framework/src/Volo.Abp.EntityFrameworkCore.MySQL", |
|
|
|
"framework/src/Volo.Abp.EntityFrameworkCore.MySQL", |
|
|
|
# "framework/src/Volo.Abp.EntityFrameworkCore.Oracle", |
|
|
|
# "framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart", |
|
|
|
"framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql", |
|
|
|
|