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 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}" 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 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 Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU 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}.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.ActiveCfg = PostgreSQL|Any CPU
{5A07FFDF-F979-44F9-BE24-81D6A25BEADB}.PostgreSQL|Any CPU.Build.0 = 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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -2392,6 +2400,7 @@ Global
{8D0C8993-580A-4585-BE3B-87895C76FC89} = {07DFEB1E-ED92-4E97-A801-FAB2D70F4F35} {8D0C8993-580A-4585-BE3B-87895C76FC89} = {07DFEB1E-ED92-4E97-A801-FAB2D70F4F35}
{AA742577-63B0-4188-AA36-AC6E0ED99BB6} = {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} {5A07FFDF-F979-44F9-BE24-81D6A25BEADB} = {0D69B63D-F082-4D57-9FF0-355642C56993}
{2B167D92-2327-4679-9096-49F274FABE0C} = {0D69B63D-F082-4D57-9FF0-355642C56993}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {711A43C0-A2F8-4E5C-9B9F-F2551E4B3FF1} 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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
[DbContext(typeof(SingleMigrationsDbContext))] [DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20231012032107_Initial-Single-Project")] [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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class InitialSingleProject : Migration 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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
[DbContext(typeof(SingleMigrationsDbContext))] [DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20231016100545_Add-Field-With-Text-Template-Definition")] [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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddFieldWithTextTemplateDefinition : Migration 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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
[DbContext(typeof(SingleMigrationsDbContext))] [DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20231026015443_Add-Field-With-Notification-Definition")] [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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddFieldWithNotificationDefinition : Migration 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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
[DbContext(typeof(SingleMigrationsDbContext))] [DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20231028000247_Fix-Notification-Template-Length")] [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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class FixNotificationTemplateLength : Migration 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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
[DbContext(typeof(SingleMigrationsDbContext))] [DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20231222014501_Upgrade-Abp-Framework-To-8.0.0")] [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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class UpgradeAbpFrameworkTo800 : Migration 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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
[DbContext(typeof(SingleMigrationsDbContext))] [DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20240217054527_Upgrade-Abp-Framework-To-8.0.3")] [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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class UpgradeAbpFrameworkTo803 : Migration 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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
[DbContext(typeof(SingleMigrationsDbContext))] [DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20240624002940_Upgrade-Abp-Framework-To-8.1.3")] [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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class UpgradeAbpFrameworkTo813 : Migration 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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
[DbContext(typeof(SingleMigrationsDbContext))] [DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20240729102008_Upgrade-Abp-Framework-To-8-2-0")] [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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class UpgradeAbpFrameworkTo820 : Migration 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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
[DbContext(typeof(SingleMigrationsDbContext))] [DbContext(typeof(SingleMigrationsDbContext))]
[Migration("20240929080118_Add-Demo-Module")] [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 #nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class AddDemoModule : Migration 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;
using Microsoft.EntityFrameworkCore.Design; using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using System.IO; using System.IO;
namespace LY.MicroService.Applications.Single.EntityFrameworkCore; namespace LY.MicroService.Applications.Single.EntityFrameworkCore.MySql;
public class SingleMigrationsDbContextFactory : IDesignTimeDbContextFactory<SingleMigrationsDbContext> public class SingleMigrationsDbContextFactory : IDesignTimeDbContextFactory<SingleMigrationsDbContext>
{ {
public SingleMigrationsDbContext CreateDbContext(string[] args) public SingleMigrationsDbContext CreateDbContext(string[] args)
{ {
var configuration = BuildConfiguration(); var configuration = BuildConfiguration();
var connectionString = configuration.GetConnectionString("Default"); var connectionString = configuration.GetConnectionString("Default");
var builder = new DbContextOptionsBuilder<SingleMigrationsDbContext>() var builder = new DbContextOptionsBuilder<SingleMigrationsDbContext>()
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString)); .UseMySql(connectionString, ServerVersion.AutoDetect(connectionString), b => b.MigrationsAssembly("LY.MicroService.Applications.Single.EntityFrameworkCore.MySql"));
return new SingleMigrationsDbContext(builder!.Options); return new SingleMigrationsDbContext(builder!.Options);
} }
private static IConfigurationRoot BuildConfiguration() private static IConfigurationRoot BuildConfiguration()
{ {
var builder = new ConfigurationBuilder() var builder = new ConfigurationBuilder()
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.Applications.Single.DbMigrator/")) .SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.Applications.Single.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false) .AddJsonFile("appsettings.json", optional: false)
.AddJsonFile("appsettings.Development.json", optional: true); #if MYSQL
.AddJsonFile("appsettings.MySql.json", optional: false)
return builder.Build(); #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"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\configureawait.props" /> <Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<RootNamespace>LY.MicroService.Applications.Single.EntityFrameworkCore</RootNamespace> <RootNamespace>LY.MicroService.Applications.Single.EntityFrameworkCore</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools"> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" /> <PackageReference Include="Volo.Abp.Identity.Application.Contracts" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySql" /> <PackageReference Include="Volo.Abp.OpenIddict.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.OpenIddict.EntityFrameworkCore" /> <PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" /> <PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" /> <PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" /> </ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup> <ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging.EntityFrameworkCore\LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj" />
<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\wechat\LINGYUN.Abp.WeChat\LINGYUN.Abp.WeChat.csproj" /> <ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.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" />
<ProjectReference Include="..\..\modules\demo\LINGYUN.Abp.Demo.EntityFrameworkCore\LINGYUN.Abp.Demo.EntityFrameworkCore.csproj" /> </ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup> <ProjectReference Include="..\..\modules\realtime-message\LINGYUN.Abp.MessageService.EntityFrameworkCore\LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj" />
<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\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\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" /> <ProjectReference Include="..\..\modules\platform\LINGYUN.Platform.EntityFrameworkCore\LINGYUN.Platform.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\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\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\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\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\task-management\LINGYUN.Abp.TaskManagement.EntityFrameworkCore\LINGYUN.Abp.TaskManagement.EntityFrameworkCore.csproj" /> <ProjectReference Include="..\..\modules\webhooks\LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore\LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\webhooks\LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore\LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore.csproj" /> </ItemGroup>
</ItemGroup>
</Project>
<ItemGroup>
<Folder Include="Migrations\" />
</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.AuditLogging.EntityFrameworkCore;
using LINGYUN.Abp.Data.DbMigrator; using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Identity.EntityFrameworkCore; using LINGYUN.Abp.Identity.EntityFrameworkCore;
using LINGYUN.Abp.IdentityServer.EntityFrameworkCore; using LINGYUN.Abp.IdentityServer.EntityFrameworkCore;
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore; using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
using LINGYUN.Abp.MessageService.EntityFrameworkCore; using LINGYUN.Abp.MessageService.EntityFrameworkCore;
using LINGYUN.Abp.Notifications.EntityFrameworkCore; using LINGYUN.Abp.Notifications.EntityFrameworkCore;
using LINGYUN.Abp.Saas.EntityFrameworkCore; using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; using LINGYUN.Abp.TaskManagement.EntityFrameworkCore;
using LINGYUN.Abp.TextTemplating.EntityFrameworkCore; using LINGYUN.Abp.TextTemplating.EntityFrameworkCore;
using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore; using LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore;
using LINGYUN.Abp.WeChat; using LINGYUN.Abp.WeChat;
using LINGYUN.Platform.EntityFrameworkCore; using LINGYUN.Platform.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.MySQL; using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.FeatureManagement.EntityFrameworkCore; using Volo.Abp.Modularity;
using Volo.Abp.Modularity; using Volo.Abp.OpenIddict.EntityFrameworkCore;
using Volo.Abp.OpenIddict.EntityFrameworkCore; using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore; using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
namespace LY.MicroService.Applications.Single.EntityFrameworkCore;
namespace LY.MicroService.Applications.Single.EntityFrameworkCore;
[DependsOn(
[DependsOn( typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpSaasEntityFrameworkCoreModule), typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule), typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule), typeof(AbpNotificationsEntityFrameworkCoreModule),
typeof(AbpNotificationsEntityFrameworkCoreModule), typeof(AbpMessageServiceEntityFrameworkCoreModule),
typeof(AbpMessageServiceEntityFrameworkCoreModule), typeof(PlatformEntityFrameworkCoreModule),
typeof(PlatformEntityFrameworkCoreModule), typeof(AbpLocalizationManagementEntityFrameworkCoreModule),
typeof(AbpLocalizationManagementEntityFrameworkCoreModule), typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpIdentityEntityFrameworkCoreModule), typeof(AbpIdentityServerEntityFrameworkCoreModule),
typeof(AbpIdentityServerEntityFrameworkCoreModule), typeof(AbpOpenIddictEntityFrameworkCoreModule),
typeof(AbpOpenIddictEntityFrameworkCoreModule), typeof(AbpTextTemplatingEntityFrameworkCoreModule),
typeof(AbpTextTemplatingEntityFrameworkCoreModule), typeof(WebhooksManagementEntityFrameworkCoreModule),
typeof(WebhooksManagementEntityFrameworkCoreModule), typeof(TaskManagementEntityFrameworkCoreModule),
typeof(TaskManagementEntityFrameworkCoreModule), typeof(AbpWeChatModule),
typeof(AbpEntityFrameworkCoreMySQLModule), typeof(AbpDataDbMigratorModule)
typeof(AbpWeChatModule), )]
typeof(AbpDataDbMigratorModule) public class SingleMigrationsEntityFrameworkCoreModule : AbpModule
)] {
public class SingleMigrationsEntityFrameworkCoreModule : AbpModule public override void ConfigureServices(ServiceConfigurationContext context)
{ {
public override void ConfigureServices(ServiceConfigurationContext context) context.Services.AddAbpDbContext<SingleMigrationsDbContext>();
{ }
context.Services.AddAbpDbContext<SingleMigrationsDbContext>(); }
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

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

Loading…
Cancel
Save