Browse Source

feat: 分离LY.MicroService.Applications.Single.EntityFrameworkCore 中的MySql逻辑

pull/1048/head
feijie 1 year ago
parent
commit
4b2557364a
  1. 9
      aspnet-core/LINGYUN.MicroService.SingleProject.sln
  2. 9
      aspnet-core/LY.MicroService.Applications.Single.DbMigrator/appsettings.MySql.json
  3. 4
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/FodyWeavers.xml
  4. 25
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/FodyWeavers.xsd
  5. 22
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.csproj
  6. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231012032107_Initial-Single-Project.Designer.cs
  7. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231012032107_Initial-Single-Project.cs
  8. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231016100545_Add-Field-With-Text-Template-Definition.Designer.cs
  9. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231016100545_Add-Field-With-Text-Template-Definition.cs
  10. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231026015443_Add-Field-With-Notification-Definition.Designer.cs
  11. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231026015443_Add-Field-With-Notification-Definition.cs
  12. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231028000247_Fix-Notification-Template-Length.Designer.cs
  13. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231028000247_Fix-Notification-Template-Length.cs
  14. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231222014501_Upgrade-Abp-Framework-To-8.0.0.Designer.cs
  15. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231222014501_Upgrade-Abp-Framework-To-8.0.0.cs
  16. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240217054527_Upgrade-Abp-Framework-To-8.0.3.Designer.cs
  17. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240217054527_Upgrade-Abp-Framework-To-8.0.3.cs
  18. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240624002940_Upgrade-Abp-Framework-To-8.1.3.Designer.cs
  19. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240624002940_Upgrade-Abp-Framework-To-8.1.3.cs
  20. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240729102008_Upgrade-Abp-Framework-To-8-2-0.Designer.cs
  21. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240729102008_Upgrade-Abp-Framework-To-8-2-0.cs
  22. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240929080118_Add-Demo-Module.Designer.cs
  23. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240929080118_Add-Demo-Module.cs
  24. 11072
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/SingleMigrationsDbContextModelSnapshot.cs
  25. 63
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/SingleMigrationsDbContextFactory.cs
  26. 23
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/SingleMigrationsEntityFrameworkCoreMySqlModule.cs
  27. 91
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/LY.MicroService.Applications.Single.EntityFrameworkCore.csproj
  28. 105
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/SingleMigrationsEntityFrameworkCoreModule.cs
  29. 2
      aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs

9
aspnet-core/LINGYUN.MicroService.SingleProject.sln

@ -608,6 +608,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Elsa.EntityFram
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql", "migrations\LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql\LY.MicroService.Applications.Single.EntityFrameworkCore.PostgreSql.csproj", "{5A07FFDF-F979-44F9-BE24-81D6A25BEADB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.Applications.Single.EntityFrameworkCore.MySql", "migrations\LY.MicroService.Applications.Single.EntityFrameworkCore.MySql\LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.csproj", "{2B167D92-2327-4679-9096-49F274FABE0C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -2097,6 +2099,12 @@ Global
{5A07FFDF-F979-44F9-BE24-81D6A25BEADB}.Release|Any CPU.Build.0 = Release|Any CPU
{5A07FFDF-F979-44F9-BE24-81D6A25BEADB}.PostgreSQL|Any CPU.ActiveCfg = PostgreSQL|Any CPU
{5A07FFDF-F979-44F9-BE24-81D6A25BEADB}.PostgreSQL|Any CPU.Build.0 = PostgreSQL|Any CPU
{2B167D92-2327-4679-9096-49F274FABE0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B167D92-2327-4679-9096-49F274FABE0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B167D92-2327-4679-9096-49F274FABE0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B167D92-2327-4679-9096-49F274FABE0C}.Release|Any CPU.Build.0 = Release|Any CPU
{2B167D92-2327-4679-9096-49F274FABE0C}.PostgreSQL|Any CPU.ActiveCfg = PostgreSQL|Any CPU
{2B167D92-2327-4679-9096-49F274FABE0C}.PostgreSQL|Any CPU.Build.0 = PostgreSQL|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -2392,6 +2400,7 @@ Global
{8D0C8993-580A-4585-BE3B-87895C76FC89} = {07DFEB1E-ED92-4E97-A801-FAB2D70F4F35}
{AA742577-63B0-4188-AA36-AC6E0ED99BB6} = {07DFEB1E-ED92-4E97-A801-FAB2D70F4F35}
{5A07FFDF-F979-44F9-BE24-81D6A25BEADB} = {0D69B63D-F082-4D57-9FF0-355642C56993}
{2B167D92-2327-4679-9096-49F274FABE0C} = {0D69B63D-F082-4D57-9FF0-355642C56993}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {711A43C0-A2F8-4E5C-9B9F-F2551E4B3FF1}

9
aspnet-core/LY.MicroService.Applications.Single.DbMigrator/appsettings.MySql.json

@ -0,0 +1,9 @@
{
"ConnectionStrings": {
"Default": "Server=localhost;Port=3306;Database=SingleService;Uid=root;Pwd=myPassword;",
"AbpAuditLogging": "Server=localhost;Port=3306;Database=SingleService_AuditLogs;Uid=root;Pwd=myPassword;",
"AbpFeatureManagement": "Server=localhost;Port=3306;Database=SingleService_Features;Uid=root;Pwd=myPassword;",
"AbpPermissionManagement": "Server=localhost;Port=3306;Database=SingleService_Permissions;Uid=root;Pwd=myPassword;",
"AbpSettingManagement": "Server=localhost;Port=3306;Database=SingleService_Settings;Uid=root;Pwd=myPassword;"
}
}

4
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/FodyWeavers.xml

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
</Weavers>

25
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/FodyWeavers.xsd

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This is a partial XSD schema. For brevity, only essential elements are included -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>Use to enforce assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

22
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.csproj

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySql" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LY.MicroService.Applications.Single.EntityFrameworkCore\LY.MicroService.Applications.Single.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231012032107_Initial-Single-Project.Designer.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231012032107_Initial-Single-Project.Designer.cs

@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
[DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20231012032107_Initial-Single-Project")]

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231012032107_Initial-Single-Project.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231012032107_Initial-Single-Project.cs

@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
/// <inheritdoc />
public partial class InitialSingleProject : Migration

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231016100545_Add-Field-With-Text-Template-Definition.Designer.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231016100545_Add-Field-With-Text-Template-Definition.Designer.cs

@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
[DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20231016100545_Add-Field-With-Text-Template-Definition")]

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231016100545_Add-Field-With-Text-Template-Definition.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231016100545_Add-Field-With-Text-Template-Definition.cs

@ -2,7 +2,7 @@
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
/// <inheritdoc />
public partial class AddFieldWithTextTemplateDefinition : Migration

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231026015443_Add-Field-With-Notification-Definition.Designer.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231026015443_Add-Field-With-Notification-Definition.Designer.cs

@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
[DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20231026015443_Add-Field-With-Notification-Definition")]

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231026015443_Add-Field-With-Notification-Definition.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231026015443_Add-Field-With-Notification-Definition.cs

@ -2,7 +2,7 @@
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
/// <inheritdoc />
public partial class AddFieldWithNotificationDefinition : Migration

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231028000247_Fix-Notification-Template-Length.Designer.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231028000247_Fix-Notification-Template-Length.Designer.cs

@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
[DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20231028000247_Fix-Notification-Template-Length")]

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231028000247_Fix-Notification-Template-Length.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231028000247_Fix-Notification-Template-Length.cs

@ -2,7 +2,7 @@
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
/// <inheritdoc />
public partial class FixNotificationTemplateLength : Migration

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231222014501_Upgrade-Abp-Framework-To-8.0.0.Designer.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231222014501_Upgrade-Abp-Framework-To-8.0.0.Designer.cs

@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
[DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20231222014501_Upgrade-Abp-Framework-To-8.0.0")]

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20231222014501_Upgrade-Abp-Framework-To-8.0.0.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20231222014501_Upgrade-Abp-Framework-To-8.0.0.cs

@ -2,7 +2,7 @@
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
/// <inheritdoc />
public partial class UpgradeAbpFrameworkTo800 : Migration

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20240217054527_Upgrade-Abp-Framework-To-8.0.3.Designer.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240217054527_Upgrade-Abp-Framework-To-8.0.3.Designer.cs

@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
[DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20240217054527_Upgrade-Abp-Framework-To-8.0.3")]

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20240217054527_Upgrade-Abp-Framework-To-8.0.3.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240217054527_Upgrade-Abp-Framework-To-8.0.3.cs

@ -2,7 +2,7 @@
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
/// <inheritdoc />
public partial class UpgradeAbpFrameworkTo803 : Migration

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20240624002940_Upgrade-Abp-Framework-To-8.1.3.Designer.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240624002940_Upgrade-Abp-Framework-To-8.1.3.Designer.cs

@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
[DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20240624002940_Upgrade-Abp-Framework-To-8.1.3")]

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20240624002940_Upgrade-Abp-Framework-To-8.1.3.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240624002940_Upgrade-Abp-Framework-To-8.1.3.cs

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
/// <inheritdoc />
public partial class UpgradeAbpFrameworkTo813 : Migration

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20240729102008_Upgrade-Abp-Framework-To-8-2-0.Designer.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240729102008_Upgrade-Abp-Framework-To-8-2-0.Designer.cs

@ -10,7 +10,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
[DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20240729102008_Upgrade-Abp-Framework-To-8-2-0")]

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20240729102008_Upgrade-Abp-Framework-To-8-2-0.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240729102008_Upgrade-Abp-Framework-To-8-2-0.cs

@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
/// <inheritdoc />
public partial class UpgradeAbpFrameworkTo820 : Migration

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20240929080118_Add-Demo-Module.Designer.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240929080118_Add-Demo-Module.Designer.cs

@ -10,7 +10,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
[DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20240929080118_Add-Demo-Module")]

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20240929080118_Add-Demo-Module.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/20240929080118_Add-Demo-Module.cs

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{
/// <inheritdoc />
public partial class AddDemoModule : Migration

11072
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/SingleMigrationsDbContextModelSnapshot.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/Migrations/SingleMigrationsDbContextModelSnapshot.cs

File diff suppressed because it is too large

63
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/SingleMigrationsDbContextFactory.cs → aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/SingleMigrationsDbContextFactory.cs

@ -1,30 +1,33 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.Applications.Single.EntityFrameworkCore;
public class SingleMigrationsDbContextFactory : IDesignTimeDbContextFactory<SingleMigrationsDbContext>
{
public SingleMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var connectionString = configuration.GetConnectionString("Default");
var builder = new DbContextOptionsBuilder<SingleMigrationsDbContext>()
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString));
return new SingleMigrationsDbContext(builder!.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.Applications.Single.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false)
.AddJsonFile("appsettings.Development.json", optional: true);
return builder.Build();
}
}
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql;
public class SingleMigrationsDbContextFactory : IDesignTimeDbContextFactory<SingleMigrationsDbContext>
{
public SingleMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var connectionString = configuration.GetConnectionString("Default");
var builder = new DbContextOptionsBuilder<SingleMigrationsDbContext>()
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString), b => b.MigrationsAssembly("LY.MicroService.Applications.Single.EntityFrameworkCore.MySql"));
return new SingleMigrationsDbContext(builder!.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.Applications.Single.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false)
#if MYSQL
.AddJsonFile("appsettings.MySql.json", optional: false)
#endif
.AddJsonFile("appsettings.Development.json", optional: true);
return builder.Build();
}
}

23
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/SingleMigrationsEntityFrameworkCoreMySqlModule.cs

@ -0,0 +1,23 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.Modularity;
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql;
[DependsOn(
typeof(AbpEntityFrameworkCoreMySQLModule),
typeof(SingleMigrationsEntityFrameworkCoreModule)
)]
public class SingleMigrationsEntityFrameworkCoreMySqlModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<SingleMigrationsDbContext>();
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

91
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/LY.MicroService.Applications.Single.EntityFrameworkCore.csproj

@ -1,48 +1,43 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>LY.MicroService.Applications.Single.EntityFrameworkCore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySql" />
<PackageReference Include="Volo.Abp.OpenIddict.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging.EntityFrameworkCore\LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\framework\wechat\LINGYUN.Abp.WeChat\LINGYUN.Abp.WeChat.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\demo\LINGYUN.Abp.Demo.EntityFrameworkCore\LINGYUN.Abp.Demo.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\modules\realtime-message\LINGYUN.Abp.MessageService.EntityFrameworkCore\LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\realtime-notifications\LINGYUN.Abp.Notifications.EntityFrameworkCore\LINGYUN.Abp.Notifications.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\platform\LINGYUN.Platform.EntityFrameworkCore\LINGYUN.Platform.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\localization-management\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\identityServer\LINGYUN.Abp.IdentityServer.EntityFrameworkCore\LINGYUN.Abp.IdentityServer.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.EntityFrameworkCore\LINGYUN.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\text-templating\LINGYUN.Abp.TextTemplating.EntityFrameworkCore\LINGYUN.Abp.TextTemplating.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.TaskManagement.EntityFrameworkCore\LINGYUN.Abp.TaskManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\webhooks\LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore\LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>LY.MicroService.Applications.Single.EntityFrameworkCore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" />
<PackageReference Include="Volo.Abp.OpenIddict.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging.EntityFrameworkCore\LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\framework\wechat\LINGYUN.Abp.WeChat\LINGYUN.Abp.WeChat.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\demo\LINGYUN.Abp.Demo.EntityFrameworkCore\LINGYUN.Abp.Demo.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\modules\realtime-message\LINGYUN.Abp.MessageService.EntityFrameworkCore\LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\realtime-notifications\LINGYUN.Abp.Notifications.EntityFrameworkCore\LINGYUN.Abp.Notifications.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\platform\LINGYUN.Platform.EntityFrameworkCore\LINGYUN.Platform.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\localization-management\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\identityServer\LINGYUN.Abp.IdentityServer.EntityFrameworkCore\LINGYUN.Abp.IdentityServer.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.EntityFrameworkCore\LINGYUN.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\text-templating\LINGYUN.Abp.TextTemplating.EntityFrameworkCore\LINGYUN.Abp.TextTemplating.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.TaskManagement.EntityFrameworkCore\LINGYUN.Abp.TaskManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\webhooks\LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore\LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

105
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/SingleMigrationsEntityFrameworkCoreModule.cs

@ -1,56 +1,49 @@
using LINGYUN.Abp.AuditLogging.EntityFrameworkCore;
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Identity.EntityFrameworkCore;
using LINGYUN.Abp.IdentityServer.EntityFrameworkCore;
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
using LINGYUN.Abp.MessageService.EntityFrameworkCore;
using LINGYUN.Abp.Notifications.EntityFrameworkCore;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LINGYUN.Abp.TaskManagement.EntityFrameworkCore;
using LINGYUN.Abp.TextTemplating.EntityFrameworkCore;
using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore;
using LINGYUN.Abp.WeChat;
using LINGYUN.Platform.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
namespace LY.MicroService.Applications.Single.EntityFrameworkCore;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(AbpNotificationsEntityFrameworkCoreModule),
typeof(AbpMessageServiceEntityFrameworkCoreModule),
typeof(PlatformEntityFrameworkCoreModule),
typeof(AbpLocalizationManagementEntityFrameworkCoreModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpIdentityServerEntityFrameworkCoreModule),
typeof(AbpOpenIddictEntityFrameworkCoreModule),
typeof(AbpTextTemplatingEntityFrameworkCoreModule),
typeof(WebhooksManagementEntityFrameworkCoreModule),
typeof(TaskManagementEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreMySQLModule),
typeof(AbpWeChatModule),
typeof(AbpDataDbMigratorModule)
)]
public class SingleMigrationsEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<SingleMigrationsDbContext>();
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}
using LINGYUN.Abp.AuditLogging.EntityFrameworkCore;
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Identity.EntityFrameworkCore;
using LINGYUN.Abp.IdentityServer.EntityFrameworkCore;
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
using LINGYUN.Abp.MessageService.EntityFrameworkCore;
using LINGYUN.Abp.Notifications.EntityFrameworkCore;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LINGYUN.Abp.TaskManagement.EntityFrameworkCore;
using LINGYUN.Abp.TextTemplating.EntityFrameworkCore;
using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore;
using LINGYUN.Abp.WeChat;
using LINGYUN.Platform.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
namespace LY.MicroService.Applications.Single.EntityFrameworkCore;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(AbpNotificationsEntityFrameworkCoreModule),
typeof(AbpMessageServiceEntityFrameworkCoreModule),
typeof(PlatformEntityFrameworkCoreModule),
typeof(AbpLocalizationManagementEntityFrameworkCoreModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpIdentityServerEntityFrameworkCoreModule),
typeof(AbpOpenIddictEntityFrameworkCoreModule),
typeof(AbpTextTemplatingEntityFrameworkCoreModule),
typeof(WebhooksManagementEntityFrameworkCoreModule),
typeof(TaskManagementEntityFrameworkCoreModule),
typeof(AbpWeChatModule),
typeof(AbpDataDbMigratorModule)
)]
public class SingleMigrationsEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<SingleMigrationsDbContext>();
}
}

2
aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs

@ -34,6 +34,7 @@ using Volo.Abp.EntityFrameworkCore.PostgreSql;
using LINGYUN.Abp.Elsa.EntityFrameworkCore.PostgreSql;
#else
using LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql;
using Volo.Abp.EntityFrameworkCore.MySQL;
#endif
using LINGYUN.Abp.ExceptionHandling;
using LINGYUN.Abp.ExceptionHandling.Emailing;
@ -122,7 +123,6 @@ using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
using Volo.Abp.Caching.StackExchangeRedis;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.EventBus;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Imaging;

Loading…
Cancel
Save