Browse Source

feat(migrations): 创建独立的迁移脚本项目.

pull/776/head
cKey 3 years ago
parent
commit
da422b50fe
  1. 42
      aspnet-core/LINGYUN.MicroService.All.sln
  2. 7
      aspnet-core/LINGYUN.MicroService.TaskManagement.sln
  3. 7
      aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln
  4. 2
      aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs
  5. 16
      aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.Configure.cs
  6. 15
      aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs
  7. 5
      aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj
  8. 9
      aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs
  9. 2
      aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContext.cs
  10. 8
      aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs
  11. 26
      aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs
  12. 3
      aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xml
  13. 30
      aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xsd
  14. 26
      aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/LY.MicroService.AuthServer.EntityFrameworkCore.csproj
  15. 3
      aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.Designer.cs
  16. 2
      aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.cs
  17. 2
      aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs
  18. 2
      aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorHostedService.cs
  19. 16
      aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.Configure.cs
  20. 18
      aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs
  21. 8
      aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj
  22. 13
      aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationService.cs
  23. 2
      aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContext.cs
  24. 8
      aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs
  25. 32
      aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsEntityFrameworkCoreModule.cs
  26. 3
      aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xml
  27. 30
      aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xsd
  28. 28
      aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/LY.MicroService.BackendAdmin.EntityFrameworkCore.csproj
  29. 4
      aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs
  30. 2
      aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.cs
  31. 4
      aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs
  32. 6
      aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/DataSeeder/IWeChatResourceDataSeeder.cs
  33. 2
      aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorHostedService.cs
  34. 16
      aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.Configure.cs
  35. 18
      aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.cs
  36. 6
      aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/LY.MicroService.IdentityServer.DbMigrator.csproj
  37. 8
      aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/IWeChatResourceDataSeeder.cs
  38. 2
      aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/IdentityServerDataSeedContributor.cs
  39. 2
      aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/WeChatResourceDataSeeder.cs
  40. 3
      aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/FodyWeavers.xml
  41. 30
      aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/FodyWeavers.xsd
  42. 13
      aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerDbMigrationService.cs
  43. 2
      aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsDbContext.cs
  44. 8
      aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsDbContextFactory.cs
  45. 32
      aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsEntityFrameworkCoreModule.cs
  46. 28
      aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/LY.MicroService.IdentityServer.EntityFrameworkCore.csproj
  47. 4
      aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/20230109090609_Initial-Identity-Server.Designer.cs
  48. 2
      aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/20230109090609_Initial-Identity-Server.cs
  49. 4
      aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/IdentityServerMigrationsDbContextModelSnapshot.cs
  50. 5
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj
  51. 2
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorHostedService.cs
  52. 16
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.Configure.cs
  53. 18
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.cs
  54. 25
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LY.MicroService.LocalizationManagement.EntityFrameworkCore.csproj
  55. 7
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationService.cs
  56. 2
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs
  57. 8
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs
  58. 32
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsEntityFrameworkCoreModule.cs
  59. 4
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.Designer.cs
  60. 2
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.cs
  61. 4
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs
  62. 2
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs
  63. 4
      aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs
  64. 5
      aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj
  65. 2
      aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorHostedService.cs
  66. 16
      aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.Configure.cs
  67. 20
      aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.cs
  68. 25
      aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/LY.MicroService.Platform.EntityFrameworkCore.csproj
  69. 4
      aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.Designer.cs
  70. 2
      aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.cs
  71. 4
      aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/PlatformMigrationsDbContextModelSnapshot.cs
  72. 7
      aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformDbMigrationService.cs
  73. 2
      aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContext.cs
  74. 8
      aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContextFactory.cs
  75. 31
      aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsEntityFrameworkCoreModule.cs
  76. 5
      aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/LY.MicroService.RealtimeMessage.DbMigrator.csproj
  77. 2
      aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorHostedService.cs
  78. 16
      aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.Configure.cs
  79. 18
      aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.cs
  80. 26
      aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj
  81. 4
      aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs
  82. 2
      aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.cs
  83. 4
      aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs
  84. 13
      aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDbMigrationService.cs
  85. 2
      aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs
  86. 8
      aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs
  87. 34
      aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsEntityFrameworkCoreModule.cs
  88. 5
      aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/LY.MicroService.TaskManagement.DbMigrator.csproj
  89. 270
      aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs
  90. 16
      aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.Configure.cs
  91. 21
      aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.cs
  92. 3
      aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xml
  93. 30
      aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xsd
  94. 28
      aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/LY.MicroService.TaskManagement.EntityFrameworkCore.csproj
  95. 4
      aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.Designer.cs
  96. 2
      aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.cs
  97. 4
      aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs
  98. 13
      aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationService.cs
  99. 2
      aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContext.cs
  100. 8
      aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs

42
aspnet-core/LINGYUN.MicroService.All.sln

@ -556,6 +556,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
..\.github\workflows\release.yml = ..\.github\workflows\release.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.BackendAdmin.EntityFrameworkCore", "migrations\LY.MicroService.BackendAdmin.EntityFrameworkCore\LY.MicroService.BackendAdmin.EntityFrameworkCore.csproj", "{742913C8-F10F-4B5E-AAE5-A52800F080BB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.AuthServer.EntityFrameworkCore", "migrations\LY.MicroService.AuthServer.EntityFrameworkCore\LY.MicroService.AuthServer.EntityFrameworkCore.csproj", "{730CC41B-99F7-4A1B-A645-093494ECEBC1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.IdentityServer.EntityFrameworkCore", "migrations\LY.MicroService.IdentityServer.EntityFrameworkCore\LY.MicroService.IdentityServer.EntityFrameworkCore.csproj", "{F74D8A4E-737F-4144-94BF-9EE80AFC8E9B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.LocalizationManagement.EntityFrameworkCore", "migrations\LY.MicroService.LocalizationManagement.EntityFrameworkCore\LY.MicroService.LocalizationManagement.EntityFrameworkCore.csproj", "{7DBC2821-22B2-497F-A594-18CF3EE79940}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.Platform.EntityFrameworkCore", "migrations\LY.MicroService.Platform.EntityFrameworkCore\LY.MicroService.Platform.EntityFrameworkCore.csproj", "{B9421FC5-47EB-428D-92C6-F688D02ABE06}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.RealtimeMessage.EntityFrameworkCore", "migrations\LY.MicroService.RealtimeMessage.EntityFrameworkCore\LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj", "{6AC6AC37-0163-4EF2-A49C-2E0B87F73AE9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -1410,6 +1422,30 @@ Global
{42A0FC3F-C38E-4FF4-B78A-5ED29DF144BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42A0FC3F-C38E-4FF4-B78A-5ED29DF144BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42A0FC3F-C38E-4FF4-B78A-5ED29DF144BF}.Release|Any CPU.Build.0 = Release|Any CPU
{742913C8-F10F-4B5E-AAE5-A52800F080BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{742913C8-F10F-4B5E-AAE5-A52800F080BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{742913C8-F10F-4B5E-AAE5-A52800F080BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{742913C8-F10F-4B5E-AAE5-A52800F080BB}.Release|Any CPU.Build.0 = Release|Any CPU
{730CC41B-99F7-4A1B-A645-093494ECEBC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{730CC41B-99F7-4A1B-A645-093494ECEBC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{730CC41B-99F7-4A1B-A645-093494ECEBC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{730CC41B-99F7-4A1B-A645-093494ECEBC1}.Release|Any CPU.Build.0 = Release|Any CPU
{F74D8A4E-737F-4144-94BF-9EE80AFC8E9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F74D8A4E-737F-4144-94BF-9EE80AFC8E9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F74D8A4E-737F-4144-94BF-9EE80AFC8E9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F74D8A4E-737F-4144-94BF-9EE80AFC8E9B}.Release|Any CPU.Build.0 = Release|Any CPU
{7DBC2821-22B2-497F-A594-18CF3EE79940}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7DBC2821-22B2-497F-A594-18CF3EE79940}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7DBC2821-22B2-497F-A594-18CF3EE79940}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7DBC2821-22B2-497F-A594-18CF3EE79940}.Release|Any CPU.Build.0 = Release|Any CPU
{B9421FC5-47EB-428D-92C6-F688D02ABE06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B9421FC5-47EB-428D-92C6-F688D02ABE06}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B9421FC5-47EB-428D-92C6-F688D02ABE06}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B9421FC5-47EB-428D-92C6-F688D02ABE06}.Release|Any CPU.Build.0 = Release|Any CPU
{6AC6AC37-0163-4EF2-A49C-2E0B87F73AE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6AC6AC37-0163-4EF2-A49C-2E0B87F73AE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6AC6AC37-0163-4EF2-A49C-2E0B87F73AE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6AC6AC37-0163-4EF2-A49C-2E0B87F73AE9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -1678,6 +1714,12 @@ Global
{EFC5C34F-81A1-4EFC-966F-50B646C54FA6} = {1A23BB7F-1839-4204-88C5-7E9A6C9FBF1E}
{42A0FC3F-C38E-4FF4-B78A-5ED29DF144BF} = {90E88EAC-4291-4406-8D88-EFDF61B11292}
{F3E04039-7BEE-46F8-B33B-FE13E977DCCA} = {52E60F16-6304-4E37-A220-C94D8C5D27DC}
{742913C8-F10F-4B5E-AAE5-A52800F080BB} = {E12DFE37-3F4D-435D-97AE-903259AE2DF4}
{730CC41B-99F7-4A1B-A645-093494ECEBC1} = {D724FDCC-375A-4D61-A444-4264A00A6AC9}
{F74D8A4E-737F-4144-94BF-9EE80AFC8E9B} = {B2493730-4DDC-4DA7-BF19-CACD75450270}
{7DBC2821-22B2-497F-A594-18CF3EE79940} = {B18CF0D3-3D01-4A64-A9C4-DC0C214BEE42}
{B9421FC5-47EB-428D-92C6-F688D02ABE06} = {F260FB5F-C6C7-4948-B638-E4D6986D07ED}
{6AC6AC37-0163-4EF2-A49C-2E0B87F73AE9} = {B1AC656F-8F4C-43D5-B5A0-CCF5F119EA44}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C95FDF91-16F2-4A8B-A4BE-0E62D1B66718}

7
aspnet-core/LINGYUN.MicroService.TaskManagement.sln

@ -84,6 +84,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "migrations", "migrations",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.TaskManagement.DbMigrator", "migrations\LY.MicroService.TaskManagement.DbMigrator\LY.MicroService.TaskManagement.DbMigrator.csproj", "{52FD8F39-0AB6-4C51-A584-187C219AC8B5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.TaskManagement.EntityFrameworkCore", "migrations\LY.MicroService.TaskManagement.EntityFrameworkCore\LY.MicroService.TaskManagement.EntityFrameworkCore.csproj", "{58F51875-6D2C-4A65-9DD3-8BC004B39B72}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -206,6 +208,10 @@ Global
{52FD8F39-0AB6-4C51-A584-187C219AC8B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{52FD8F39-0AB6-4C51-A584-187C219AC8B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{52FD8F39-0AB6-4C51-A584-187C219AC8B5}.Release|Any CPU.Build.0 = Release|Any CPU
{58F51875-6D2C-4A65-9DD3-8BC004B39B72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58F51875-6D2C-4A65-9DD3-8BC004B39B72}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58F51875-6D2C-4A65-9DD3-8BC004B39B72}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58F51875-6D2C-4A65-9DD3-8BC004B39B72}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -240,6 +246,7 @@ Global
{FEC5FD25-9B26-4245-88D8-7621B26C7C3A} = {B38D2141-AC0F-4F4A-9315-4292E3856C15}
{DF963ABB-E713-49E9-A03C-DEB431E369DF} = {B38D2141-AC0F-4F4A-9315-4292E3856C15}
{52FD8F39-0AB6-4C51-A584-187C219AC8B5} = {820A8FA4-17C4-44DF-8C31-9F211D00F790}
{58F51875-6D2C-4A65-9DD3-8BC004B39B72} = {820A8FA4-17C4-44DF-8C31-9F211D00F790}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E1FD1F4C-D344-408B-97CF-B6F1F6D7D293}

7
aspnet-core/LINGYUN.MicroService.WebhooksManagement.sln

@ -43,6 +43,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "migrations", "migrations",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LY.MicroService.WebhooksManagement.DbMigrator", "migrations\LY.MicroService.WebhooksManagement.DbMigrator\LY.MicroService.WebhooksManagement.DbMigrator.csproj", "{3BC77471-D273-4C9C-8985-7FE450DA4686}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LY.MicroService.WebhooksManagement.EntityFrameworkCore", "migrations\LY.MicroService.WebhooksManagement.EntityFrameworkCore\LY.MicroService.WebhooksManagement.EntityFrameworkCore.csproj", "{CC0BF1BE-A938-4BED-B5DD-AEA0235FF978}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -113,6 +115,10 @@ Global
{3BC77471-D273-4C9C-8985-7FE450DA4686}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3BC77471-D273-4C9C-8985-7FE450DA4686}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3BC77471-D273-4C9C-8985-7FE450DA4686}.Release|Any CPU.Build.0 = Release|Any CPU
{CC0BF1BE-A938-4BED-B5DD-AEA0235FF978}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC0BF1BE-A938-4BED-B5DD-AEA0235FF978}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC0BF1BE-A938-4BED-B5DD-AEA0235FF978}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC0BF1BE-A938-4BED-B5DD-AEA0235FF978}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -134,6 +140,7 @@ Global
{46C08EF3-4C81-411E-B5E4-AC3A5040DC67} = {FB7A9794-06D2-42CF-939E-4626497B97BD}
{BBF1C93D-EF73-4B00-919F-5E7F360BDB03} = {FB7A9794-06D2-42CF-939E-4626497B97BD}
{3BC77471-D273-4C9C-8985-7FE450DA4686} = {2868332B-7D4F-4B43-8FC3-BA5CACC36C7E}
{CC0BF1BE-A938-4BED-B5DD-AEA0235FF978} = {2868332B-7D4F-4B43-8FC3-BA5CACC36C7E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {80ED12A5-C899-459F-A181-ADCC9D680DE5}

2
aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorHostedService.cs

@ -1,4 +1,4 @@
using LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore;
using LY.MicroService.AuthServer.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

16
aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.Configure.cs

@ -1,18 +1,4 @@
using LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
namespace LY.MicroService.AuthServer.DbMigrator;
namespace LY.MicroService.AuthServer.DbMigrator;
public partial class AuthServerDbMigratorModule
{
private void ConfigureDbContext(IServiceCollection services)
{
services.AddAbpDbContext<AuthServerMigrationsDbContext>();
// 配置Ef
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

15
aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/AuthServerDbMigratorModule.cs

@ -1,23 +1,14 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Identity.EntityFrameworkCore;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LY.MicroService.AuthServer.EntityFrameworkCore;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict.EntityFrameworkCore;
namespace LY.MicroService.AuthServer.DbMigrator;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpOpenIddictEntityFrameworkCoreModule),
typeof(AbpDataDbMigratorModule),
typeof(AuthServerMigrationsEntityFrameworkCoreModule),
typeof(AbpAutofacModule)
)]
public partial class AuthServerDbMigratorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureDbContext(context.Services);
}
}

5
aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/LY.MicroService.AuthServer.DbMigrator.csproj

@ -44,10 +44,7 @@
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.EntityFrameworkCore\LINGYUN.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
<ProjectReference Include="..\LY.MicroService.AuthServer.EntityFrameworkCore\LY.MicroService.AuthServer.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

9
aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/EntityFrameworkCore/AuthServerDbMigrationService.cs → aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerDbMigrationService.cs

@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
namespace LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.AuthServer.EntityFrameworkCore;
public class AuthServerDbMigrationService : ITransientDependency
{
@ -190,7 +195,7 @@ public class AuthServerDbMigrationService : ITransientDependency
return Path.Combine(slnDirectoryPath, "LY.MicroService.BackendAdmin.DbMigrator");
}
private string? GetSolutionDirectoryPath()
private string GetSolutionDirectoryPath()
{
var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());

2
aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/EntityFrameworkCore/AuthServerMigrationsDbContext.cs → aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContext.cs

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.OpenIddict.EntityFrameworkCore;
namespace LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.AuthServer.EntityFrameworkCore;
[ConnectionStringName("AuthServerDbMigrator")]
public class AuthServerMigrationsDbContext : AbpDbContext<AuthServerMigrationsDbContext>

8
aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs → aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsDbContextFactory.cs

@ -1,8 +1,9 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.AuthServer.EntityFrameworkCore;
public class AuthServerMigrationsDbContextFactory : IDesignTimeDbContextFactory<AuthServerMigrationsDbContext>
{
@ -20,9 +21,8 @@ public class AuthServerMigrationsDbContextFactory : IDesignTimeDbContextFactory<
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false)
.AddJsonFile("appsettings.Development.json", optional: true);
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.AuthServer.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}

26
aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/AuthServerMigrationsEntityFrameworkCoreModule.cs

@ -0,0 +1,26 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict.EntityFrameworkCore;
namespace LY.MicroService.AuthServer.EntityFrameworkCore;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpOpenIddictEntityFrameworkCoreModule),
typeof(AbpDataDbMigratorModule)
)]
public class AuthServerMigrationsEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<AuthServerMigrationsDbContext>();
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

3
aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<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>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</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 in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

26
aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/LY.MicroService.AuthServer.EntityFrameworkCore.csproj

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\configureawait.props" />
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>LY.MicroService.AuthServer.EntityFrameworkCore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySql" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.OpenIddict.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\identity\LINGYUN.Abp.Identity.EntityFrameworkCore\LINGYUN.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

3
aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Migrations/20230109085530_Initial-Auth-Server.Designer.cs → aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.Designer.cs

@ -1,6 +1,5 @@
// <auto-generated />
using System;
using LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
@ -9,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.AuthServer.DbMigrator.Migrations
namespace LY.MicroService.AuthServer.EntityFrameworkCore.Migrations
{
[DbContext(typeof(AuthServerMigrationsDbContext))]
[Migration("20230109085530_Initial-Auth-Server")]

2
aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Migrations/20230109085530_Initial-Auth-Server.cs → aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/20230109085530_Initial-Auth-Server.cs

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

2
aspnet-core/migrations/LY.MicroService.AuthServer.DbMigrator/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs → aspnet-core/migrations/LY.MicroService.AuthServer.EntityFrameworkCore/Migrations/AuthServerMigrationsDbContextModelSnapshot.cs

@ -1,6 +1,6 @@
// <auto-generated />
using System;
using LY.MicroService.AuthServer.DbMigrator.EntityFrameworkCore;
using LY.MicroService.AuthServer.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

2
aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorHostedService.cs

@ -1,4 +1,4 @@
using LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore;
using LY.MicroService.BackendAdmin.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

16
aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.Configure.cs

@ -1,18 +1,4 @@
using LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
namespace LY.MicroService.BackendAdmin.DbMigrator;
namespace LY.MicroService.BackendAdmin.DbMigrator;
public partial class BackendAdminDbMigratorModule
{
private void ConfigureDbContext(IServiceCollection services)
{
services.AddAbpDbContext<BackendAdminMigrationsDbContext>();
// 配置Ef
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

18
aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/BackendAdminDbMigratorModule.cs

@ -1,27 +1,13 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LINGYUN.Abp.TextTemplating.EntityFrameworkCore;
using LY.MicroService.BackendAdmin.EntityFrameworkCore;
using Volo.Abp.Autofac;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
namespace LY.MicroService.BackendAdmin.DbMigrator;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(AbpTextTemplatingEntityFrameworkCoreModule),
typeof(AbpDataDbMigratorModule),
typeof(BackendAdminMigrationsEntityFrameworkCoreModule),
typeof(AbpAutofacModule)
)]
public partial class BackendAdminDbMigratorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureDbContext(context.Services);
}
}

8
aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/LY.MicroService.BackendAdmin.DbMigrator.csproj

@ -17,10 +17,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.Autofac" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySql" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
@ -43,9 +39,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\text-templating\LINGYUN.Abp.TextTemplating.EntityFrameworkCore\LINGYUN.Abp.TextTemplating.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\LY.MicroService.BackendAdmin.EntityFrameworkCore\LY.MicroService.BackendAdmin.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

13
aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/EntityFrameworkCore/BackendAdminDbMigrationService.cs → aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminDbMigrationService.cs

@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
namespace LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.BackendAdmin.EntityFrameworkCore;
public class BackendAdminDbMigrationService : ITransientDependency
{
@ -81,7 +86,7 @@ public class BackendAdminDbMigrationService : ITransientDependency
Logger.LogInformation("You can safely end this process...");
}
private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null)
private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null)
{
Logger.LogInformation($"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database...");
// 迁移租户数据
@ -94,7 +99,7 @@ public class BackendAdminDbMigrationService : ITransientDependency
});
}
private async Task SeedDataAsync(Tenant? tenant = null)
private async Task SeedDataAsync(Tenant tenant = null)
{
Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");
@ -190,7 +195,7 @@ public class BackendAdminDbMigrationService : ITransientDependency
return Path.Combine(slnDirectoryPath, "LY.MicroService.BackendAdmin.DbMigrator");
}
private string? GetSolutionDirectoryPath()
private string GetSolutionDirectoryPath()
{
var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());

2
aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/EntityFrameworkCore/BackendAdminMigrationsDbContext.cs → aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContext.cs

@ -7,7 +7,7 @@ using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
namespace LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.BackendAdmin.EntityFrameworkCore;
[ConnectionStringName("BackendAdminDbMigrator")]
public class BackendAdminMigrationsDbContext : AbpDbContext<BackendAdminMigrationsDbContext>

8
aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs → aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsDbContextFactory.cs

@ -1,8 +1,9 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.BackendAdmin.EntityFrameworkCore;
public class BackendAdminMigrationsDbContextFactory : IDesignTimeDbContextFactory<BackendAdminMigrationsDbContext>
{
@ -20,9 +21,8 @@ public class BackendAdminMigrationsDbContextFactory : IDesignTimeDbContextFactor
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false)
.AddJsonFile("appsettings.Development.json", optional: true);
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.BackendAdmin.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}

32
aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/BackendAdminMigrationsEntityFrameworkCoreModule.cs

@ -0,0 +1,32 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LINGYUN.Abp.TextTemplating.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
namespace LY.MicroService.BackendAdmin.EntityFrameworkCore;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(AbpTextTemplatingEntityFrameworkCoreModule),
typeof(AbpDataDbMigratorModule)
)]
public class BackendAdminMigrationsEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<BackendAdminMigrationsDbContext>();
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

3
aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<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>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</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 in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

28
aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/LY.MicroService.BackendAdmin.EntityFrameworkCore.csproj

@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\configureawait.props" />
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>LY.MicroService.BackendAdmin.EntityFrameworkCore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySql" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\text-templating\LINGYUN.Abp.TextTemplating.EntityFrameworkCore\LINGYUN.Abp.TextTemplating.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

4
aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs → aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.Designer.cs

@ -1,6 +1,6 @@
// <auto-generated />
using System;
using LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore;
using LY.MicroService.BackendAdmin.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.BackendAdmin.DbMigrator.Migrations
namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations
{
[DbContext(typeof(BackendAdminMigrationsDbContext))]
[Migration("20230109083613_Initial-Backend-Admin")]

2
aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Migrations/20230109083613_Initial-Backend-Admin.cs → aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/20230109083613_Initial-Backend-Admin.cs

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

4
aspnet-core/migrations/LY.MicroService.BackendAdmin.DbMigrator/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs → aspnet-core/migrations/LY.MicroService.BackendAdmin.EntityFrameworkCore/Migrations/BackendAdminMigrationsDbContextModelSnapshot.cs

@ -1,6 +1,6 @@
// <auto-generated />
using System;
using LY.MicroService.BackendAdmin.DbMigrator.EntityFrameworkCore;
using LY.MicroService.BackendAdmin.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.BackendAdmin.DbMigrator.Migrations
namespace LY.MicroService.BackendAdmin.EntityFrameworkCore.Migrations
{
[DbContext(typeof(BackendAdminMigrationsDbContext))]
partial class BackendAdminMigrationsDbContextModelSnapshot : ModelSnapshot

6
aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/DataSeeder/IWeChatResourceDataSeeder.cs

@ -1,6 +0,0 @@
namespace LY.MicroService.IdentityServer.DbMigrator.DataSeeder;
public interface IWeChatResourceDataSeeder
{
Task CreateStandardResourcesAsync();
}

2
aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorHostedService.cs

@ -1,4 +1,4 @@
using LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore;
using LY.MicroService.IdentityServer.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

16
aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.Configure.cs

@ -1,18 +1,4 @@
using LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
namespace LY.MicroService.IdentityServer.DbMigrator;
namespace LY.MicroService.IdentityServer.DbMigrator;
public partial class IdentityServerDbMigratorModule
{
private void ConfigureDbContext(IServiceCollection services)
{
services.AddAbpDbContext<IdentityServerMigrationsDbContext>();
// 配置Ef
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

18
aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/IdentityServerDbMigratorModule.cs

@ -1,27 +1,13 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Identity.EntityFrameworkCore;
using LINGYUN.Abp.IdentityServer.EntityFrameworkCore;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LINGYUN.Abp.WeChat;
using LY.MicroService.IdentityServer.EntityFrameworkCore;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
namespace LY.MicroService.IdentityServer.DbMigrator;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpIdentityServerEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpWeChatModule),
typeof(AbpDataDbMigratorModule),
typeof(IdentityServerMigrationsEntityFrameworkCoreModule),
typeof(AbpAutofacModule)
)]
public partial class IdentityServerDbMigratorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureDbContext(context.Services);
}
}

6
aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/LY.MicroService.IdentityServer.DbMigrator.csproj

@ -45,11 +45,7 @@
<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\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\wechat\LINGYUN.Abp.WeChat\LINGYUN.Abp.WeChat.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
<ProjectReference Include="..\LY.MicroService.IdentityServer.EntityFrameworkCore\LY.MicroService.IdentityServer.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

8
aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/IWeChatResourceDataSeeder.cs

@ -0,0 +1,8 @@
using System.Threading.Tasks;
namespace LY.MicroService.IdentityServer.EntityFrameworkCore.DataSeeder;
public interface IWeChatResourceDataSeeder
{
Task CreateStandardResourcesAsync();
}

2
aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/DataSeeder/IdentityServerDataSeedContributor.cs → aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/IdentityServerDataSeedContributor.cs

@ -17,7 +17,7 @@ using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Uow;
namespace LY.MicroService.IdentityServer.DbMigrator.DataSeeder;
namespace LY.MicroService.IdentityServer.EntityFrameworkCore.DataSeeder;
public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency
{

2
aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/DataSeeder/WeChatResourceDataSeeder.cs → aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/DataSeeder/WeChatResourceDataSeeder.cs

@ -6,7 +6,7 @@ using Volo.Abp.Guids;
using Volo.Abp.Identity;
using Volo.Abp.IdentityServer.IdentityResources;
namespace LY.MicroService.IdentityServer.DbMigrator.DataSeeder;
namespace LY.MicroService.IdentityServer.EntityFrameworkCore.DataSeeder;
public class WeChatResourceDataSeeder : IWeChatResourceDataSeeder, ITransientDependency
{

3
aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<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>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</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 in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

13
aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/EntityFrameworkCore/IdentityServerDbMigrationService.cs → aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerDbMigrationService.cs

@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
namespace LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.IdentityServer.EntityFrameworkCore;
public class IdentityServerDbMigrationService : ITransientDependency
{
@ -81,7 +86,7 @@ public class IdentityServerDbMigrationService : ITransientDependency
Logger.LogInformation("You can safely end this process...");
}
private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null)
private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null)
{
Logger.LogInformation($"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database...");
// 迁移租户数据
@ -94,7 +99,7 @@ public class IdentityServerDbMigrationService : ITransientDependency
});
}
private async Task SeedDataAsync(Tenant? tenant = null)
private async Task SeedDataAsync(Tenant tenant = null)
{
Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");
@ -190,7 +195,7 @@ public class IdentityServerDbMigrationService : ITransientDependency
return Path.Combine(slnDirectoryPath, "LY.MicroService.BackendAdmin.DbMigrator");
}
private string? GetSolutionDirectoryPath()
private string GetSolutionDirectoryPath()
{
var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());

2
aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/EntityFrameworkCore/IdentityServerMigrationsDbContext.cs → aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsDbContext.cs

@ -4,7 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.IdentityServer.EntityFrameworkCore;
namespace LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.IdentityServer.EntityFrameworkCore;
[ConnectionStringName("IdentityServerDbMigrator")]
public class IdentityServerMigrationsDbContext : AbpDbContext<IdentityServerMigrationsDbContext>

8
aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/EntityFrameworkCore/IdentityServerMigrationsDbContextFactory.cs → aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsDbContextFactory.cs

@ -1,8 +1,9 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.IdentityServer.EntityFrameworkCore;
public class IdentityServerMigrationsDbContextFactory : IDesignTimeDbContextFactory<IdentityServerMigrationsDbContext>
{
@ -20,9 +21,8 @@ public class IdentityServerMigrationsDbContextFactory : IDesignTimeDbContextFact
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false)
.AddJsonFile("appsettings.Development.json", optional: true);
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.IdentityServer.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}

32
aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/IdentityServerMigrationsEntityFrameworkCoreModule.cs

@ -0,0 +1,32 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Identity.EntityFrameworkCore;
using LINGYUN.Abp.IdentityServer.EntityFrameworkCore;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LINGYUN.Abp.WeChat;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
namespace LY.MicroService.IdentityServer.EntityFrameworkCore;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpIdentityServerEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpWeChatModule),
typeof(AbpDataDbMigratorModule)
)]
public class IdentityServerMigrationsEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<IdentityServerMigrationsDbContext>();
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

28
aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/LY.MicroService.IdentityServer.EntityFrameworkCore.csproj

@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\configureawait.props" />
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>LY.MicroService.IdentityServer.EntityFrameworkCore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySql" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\modules\wechat\LINGYUN.Abp.WeChat\LINGYUN.Abp.WeChat.csproj" />
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.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\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

4
aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Migrations/20230109090609_Initial-Identity-Server.Designer.cs → aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/20230109090609_Initial-Identity-Server.Designer.cs

@ -1,6 +1,6 @@
// <auto-generated />
using System;
using LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore;
using LY.MicroService.IdentityServer.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.IdentityServer.DbMigrator.Migrations
namespace LY.MicroService.IdentityServer.EntityFrameworkCore.Migrations
{
[DbContext(typeof(IdentityServerMigrationsDbContext))]
[Migration("20230109090609_Initial-Identity-Server")]

2
aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Migrations/20230109090609_Initial-Identity-Server.cs → aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/20230109090609_Initial-Identity-Server.cs

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

4
aspnet-core/migrations/LY.MicroService.IdentityServer.DbMigrator/Migrations/IdentityServerMigrationsDbContextModelSnapshot.cs → aspnet-core/migrations/LY.MicroService.IdentityServer.EntityFrameworkCore/Migrations/IdentityServerMigrationsDbContextModelSnapshot.cs

@ -1,6 +1,6 @@
// <auto-generated />
using System;
using LY.MicroService.IdentityServer.DbMigrator.EntityFrameworkCore;
using LY.MicroService.IdentityServer.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.IdentityServer.DbMigrator.Migrations
namespace LY.MicroService.IdentityServer.EntityFrameworkCore.Migrations
{
[DbContext(typeof(IdentityServerMigrationsDbContext))]
partial class IdentityServerMigrationsDbContextModelSnapshot : ModelSnapshot

5
aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LY.MicroService.LocalizationManagement.DbMigrator.csproj

@ -46,10 +46,7 @@
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\lt\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
<ProjectReference Include="..\LY.MicroService.LocalizationManagement.EntityFrameworkCore\LY.MicroService.LocalizationManagement.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

2
aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorHostedService.cs

@ -1,4 +1,4 @@
using LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore;
using LY.MicroService.LocalizationManagement.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

16
aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.Configure.cs

@ -1,18 +1,4 @@
using LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
namespace LY.MicroService.LocalizationManagement.DbMigrator;
namespace LY.MicroService.LocalizationManagement.DbMigrator;
public partial class LocalizationManagementDbMigratorModule
{
private void ConfigureDbContext(IServiceCollection services)
{
services.AddAbpDbContext<LocalizationManagementMigrationsDbContext>();
// 配置Ef
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

18
aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/LocalizationManagementDbMigratorModule.cs

@ -1,27 +1,13 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
using LY.MicroService.LocalizationManagement.EntityFrameworkCore;
using Volo.Abp.Autofac;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
namespace LY.MicroService.LocalizationManagement.DbMigrator;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(AbpLocalizationManagementEntityFrameworkCoreModule),
typeof(AbpDataDbMigratorModule),
typeof(LocalizationManagementMigrationsEntityFrameworkCoreModule),
typeof(AbpAutofacModule)
)]
public partial class LocalizationManagementDbMigratorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureDbContext(context.Services);
}
}

25
aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LY.MicroService.LocalizationManagement.EntityFrameworkCore.csproj

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>LY.MicroService.LocalizationManagement.EntityFrameworkCore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySql" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\lt\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore\LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

7
aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/EntityFrameworkCore/LocalizationManagementDbMigrationService.cs → aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementDbMigrationService.cs

@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
namespace LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore;
public class LocalizationManagementDbMigrationService : ITransientDependency
{

2
aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs → aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContext.cs

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore;
[ConnectionStringName("LocalizationManagementDbMigrator")]
public class LocalizationManagementMigrationsDbContext : AbpDbContext<LocalizationManagementMigrationsDbContext>

8
aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs → aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsDbContextFactory.cs

@ -1,8 +1,9 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore;
public class LocalizationManagementMigrationsDbContextFactory : IDesignTimeDbContextFactory<LocalizationManagementMigrationsDbContext>
{
@ -20,9 +21,8 @@ public class LocalizationManagementMigrationsDbContextFactory : IDesignTimeDbCon
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false)
.AddJsonFile("appsettings.Development.json", optional: true);
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.LocalizationManagement.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}

32
aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/LocalizationManagementMigrationsEntityFrameworkCoreModule.cs

@ -0,0 +1,32 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(AbpLocalizationManagementEntityFrameworkCoreModule),
typeof(AbpDataDbMigratorModule)
)]
public class LocalizationManagementMigrationsEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<LocalizationManagementMigrationsDbContext>();
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

4
aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230109093938_Initial-Localization-Management.Designer.cs → aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.Designer.cs

@ -1,6 +1,6 @@
// <auto-generated />
using System;
using LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore;
using LY.MicroService.LocalizationManagement.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.LocalizationManagement.DbMigrator.Migrations
namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations
{
[DbContext(typeof(LocalizationManagementMigrationsDbContext))]
[Migration("20230109093938_Initial-Localization-Management")]

2
aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230109093938_Initial-Localization-Management.cs → aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230109093938_Initial-Localization-Management.cs

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

4
aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs → aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.Designer.cs

@ -1,6 +1,6 @@
// <auto-generated />
using System;
using LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore;
using LY.MicroService.LocalizationManagement.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.LocalizationManagement.DbMigrator.Migrations
namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations
{
[DbContext(typeof(LocalizationManagementMigrationsDbContext))]
[Migration("20230110091142_Add-Default-Culture-Name-With-Resource-Record")]

2
aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs → aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/20230110091142_Add-Default-Culture-Name-With-Resource-Record.cs

@ -2,7 +2,7 @@
#nullable disable
namespace LY.MicroService.LocalizationManagement.DbMigrator.Migrations
namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations
{
/// <inheritdoc />
public partial class AddDefaultCultureNameWithResourceRecord : Migration

4
aspnet-core/migrations/LY.MicroService.LocalizationManagement.DbMigrator/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs → aspnet-core/migrations/LY.MicroService.LocalizationManagement.EntityFrameworkCore/Migrations/LocalizationManagementMigrationsDbContextModelSnapshot.cs

@ -1,6 +1,6 @@
// <auto-generated />
using System;
using LY.MicroService.LocalizationManagement.DbMigrator.EntityFrameworkCore;
using LY.MicroService.LocalizationManagement.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.LocalizationManagement.DbMigrator.Migrations
namespace LY.MicroService.LocalizationManagement.EntityFrameworkCore.Migrations
{
[DbContext(typeof(LocalizationManagementMigrationsDbContext))]
partial class LocalizationManagementMigrationsDbContextModelSnapshot : ModelSnapshot

5
aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/LY.MicroService.Platform.DbMigrator.csproj

@ -47,10 +47,7 @@
<ProjectReference Include="..\..\modules\platform\LINGYUN.Abp.UI.Navigation.VueVbenAdmin\LINGYUN.Abp.UI.Navigation.VueVbenAdmin.csproj" />
<ProjectReference Include="..\..\modules\platform\LINGYUN.Platform.EntityFrameworkCore\LINGYUN.Platform.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
<ProjectReference Include="..\LY.MicroService.Platform.EntityFrameworkCore\LY.MicroService.Platform.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

2
aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorHostedService.cs

@ -1,4 +1,4 @@
using LY.MicroService.Platform.DbMigrator.EntityFrameworkCore;
using LY.MicroService.Platform.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

16
aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.Configure.cs

@ -1,18 +1,4 @@
using LY.MicroService.Platform.DbMigrator.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
namespace LY.MicroService.Platform.DbMigrator;
namespace LY.MicroService.Platform.DbMigrator;
public partial class PlatformDbMigratorModule
{
private void ConfigureDbContext(IServiceCollection services)
{
services.AddAbpDbContext<PlatformMigrationsDbContext>();
// 配置Ef
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

20
aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/PlatformDbMigratorModule.cs

@ -1,29 +1,15 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LINGYUN.Abp.UI.Navigation.VueVbenAdmin;
using LINGYUN.Platform.EntityFrameworkCore;
using LINGYUN.Abp.UI.Navigation.VueVbenAdmin;
using LY.MicroService.Platform.EntityFrameworkCore;
using Volo.Abp.Autofac;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
namespace LY.MicroService.Platform.DbMigrator;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(PlatformEntityFrameworkCoreModule),
typeof(PlatformMigrationsEntityFrameworkCoreModule),
typeof(AbpUINavigationVueVbenAdminModule),
typeof(AbpDataDbMigratorModule),
typeof(AbpAutofacModule)
)]
public partial class PlatformDbMigratorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureDbContext(context.Services);
}
}

25
aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/LY.MicroService.Platform.EntityFrameworkCore.csproj

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>LY.MicroService.Platform.EntityFrameworkCore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySql" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\platform\LINGYUN.Platform.EntityFrameworkCore\LINGYUN.Platform.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

4
aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Migrations/20230110015904_Initial-Platform.Designer.cs → aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.Designer.cs

@ -1,6 +1,6 @@
// <auto-generated />
using System;
using LY.MicroService.Platform.DbMigrator.EntityFrameworkCore;
using LY.MicroService.Platform.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.Platform.DbMigrator.Migrations
namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations
{
[DbContext(typeof(PlatformMigrationsDbContext))]
[Migration("20230110015904_Initial-Platform")]

2
aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Migrations/20230110015904_Initial-Platform.cs → aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/20230110015904_Initial-Platform.cs

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

4
aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/Migrations/PlatformMigrationsDbContextModelSnapshot.cs → aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/Migrations/PlatformMigrationsDbContextModelSnapshot.cs

@ -1,6 +1,6 @@
// <auto-generated />
using System;
using LY.MicroService.Platform.DbMigrator.EntityFrameworkCore;
using LY.MicroService.Platform.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.Platform.DbMigrator.Migrations
namespace LY.MicroService.Platform.EntityFrameworkCore.Migrations
{
[DbContext(typeof(PlatformMigrationsDbContext))]
partial class PlatformMigrationsDbContextModelSnapshot : ModelSnapshot

7
aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/EntityFrameworkCore/PlatformDbMigrationService.cs → aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformDbMigrationService.cs

@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
namespace LY.MicroService.Platform.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.Platform.EntityFrameworkCore;
public class PlatformDbMigrationService : ITransientDependency
{

2
aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/EntityFrameworkCore/PlatformMigrationsDbContext.cs → aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContext.cs

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace LY.MicroService.Platform.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.Platform.EntityFrameworkCore;
[ConnectionStringName("PlatformDbMigrator")]
public class PlatformMigrationsDbContext : AbpDbContext<PlatformMigrationsDbContext>

8
aspnet-core/migrations/LY.MicroService.Platform.DbMigrator/EntityFrameworkCore/PlatformMigrationsDbContextFactory.cs → aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsDbContextFactory.cs

@ -1,8 +1,9 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.Platform.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.Platform.EntityFrameworkCore;
public class PlatformMigrationsDbContextFactory : IDesignTimeDbContextFactory<PlatformMigrationsDbContext>
{
@ -20,9 +21,8 @@ public class PlatformMigrationsDbContextFactory : IDesignTimeDbContextFactory<Pl
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false)
.AddJsonFile("appsettings.Development.json", optional: true);
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.Platform.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}

31
aspnet-core/migrations/LY.MicroService.Platform.EntityFrameworkCore/PlatformMigrationsEntityFrameworkCoreModule.cs

@ -0,0 +1,31 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
namespace LY.MicroService.Platform.EntityFrameworkCore;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(LINGYUN.Platform.EntityFrameworkCore.PlatformEntityFrameworkCoreModule),
typeof(AbpDataDbMigratorModule)
)]
public class PlatformMigrationsEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<PlatformMigrationsDbContext>();
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

5
aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/LY.MicroService.RealtimeMessage.DbMigrator.csproj

@ -47,10 +47,7 @@
<ProjectReference Include="..\..\modules\message\LINGYUN.Abp.MessageService.EntityFrameworkCore\LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\notifications\LINGYUN.Abp.Notifications.EntityFrameworkCore\LINGYUN.Abp.Notifications.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
<ProjectReference Include="..\LY.MicroService.RealtimeMessage.EntityFrameworkCore\LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

2
aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorHostedService.cs

@ -1,4 +1,4 @@
using LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore;
using LY.MicroService.RealtimeMessage.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

16
aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.Configure.cs

@ -1,18 +1,4 @@
using LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
namespace LY.MicroService.RealtimeMessage.DbMigrator;
namespace LY.MicroService.RealtimeMessage.DbMigrator;
public partial class RealtimeMessageDbMigratorModule
{
private void ConfigureDbContext(IServiceCollection services)
{
services.AddAbpDbContext<RealtimeMessageMigrationsDbContext>();
// 配置Ef
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

18
aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/RealtimeMessageDbMigratorModule.cs

@ -1,29 +1,15 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LINGYUN.Abp.MessageService.EntityFrameworkCore;
using LY.MicroService.RealtimeMessage.EntityFrameworkCore;
using Volo.Abp.Autofac;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using LINGYUN.Abp.Notifications.EntityFrameworkCore;
namespace LY.MicroService.RealtimeMessage.DbMigrator;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(AbpNotificationsEntityFrameworkCoreModule),
typeof(AbpMessageServiceEntityFrameworkCoreModule),
typeof(RealtimeMessageMigrationsEntityFrameworkCoreModule),
typeof(AbpDataDbMigratorModule),
typeof(AbpAutofacModule)
)]
public partial class RealtimeMessageDbMigratorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureDbContext(context.Services);
}
}

26
aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/LY.MicroService.RealtimeMessage.EntityFrameworkCore.csproj

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>LY.MicroService.RealtimeMessage.EntityFrameworkCore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySql" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\message\LINGYUN.Abp.MessageService.EntityFrameworkCore\LINGYUN.Abp.MessageService.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\notifications\LINGYUN.Abp.Notifications.EntityFrameworkCore\LINGYUN.Abp.Notifications.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

4
aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs → aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.Designer.cs

@ -1,6 +1,6 @@
// <auto-generated />
using System;
using LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore;
using LY.MicroService.RealtimeMessage.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.RealtimeMessage.DbMigrator.Migrations
namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations
{
[DbContext(typeof(RealtimeMessageMigrationsDbContext))]
[Migration("20230110063428_Initial-Realtime-Message")]

2
aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Migrations/20230110063428_Initial-Realtime-Message.cs → aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/20230110063428_Initial-Realtime-Message.cs

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

4
aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs → aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/Migrations/RealtimeMessageMigrationsDbContextModelSnapshot.cs

@ -1,6 +1,6 @@
// <auto-generated />
using System;
using LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore;
using LY.MicroService.RealtimeMessage.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.RealtimeMessage.DbMigrator.Migrations
namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore.Migrations
{
[DbContext(typeof(RealtimeMessageMigrationsDbContext))]
partial class RealtimeMessageMigrationsDbContextModelSnapshot : ModelSnapshot

13
aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/EntityFrameworkCore/RealtimeMessageDbMigrationService.cs → aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageDbMigrationService.cs

@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
namespace LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore;
public class RealtimeMessageDbMigrationService : ITransientDependency
{
@ -81,7 +86,7 @@ public class RealtimeMessageDbMigrationService : ITransientDependency
Logger.LogInformation("You can safely end this process...");
}
private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null)
private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null)
{
Logger.LogInformation($"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database...");
// 迁移租户数据
@ -94,7 +99,7 @@ public class RealtimeMessageDbMigrationService : ITransientDependency
});
}
private async Task SeedDataAsync(Tenant? tenant = null)
private async Task SeedDataAsync(Tenant tenant = null)
{
Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");
@ -190,7 +195,7 @@ public class RealtimeMessageDbMigrationService : ITransientDependency
return Path.Combine(slnDirectoryPath, "LY.MicroService.RealtimeMessage.DbMigrator");
}
private string? GetSolutionDirectoryPath()
private string GetSolutionDirectoryPath()
{
var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());

2
aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs → aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContext.cs

@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore;
[ConnectionStringName("RealtimeMessageDbMigrator")]
public class RealtimeMessageMigrationsDbContext : AbpDbContext<RealtimeMessageMigrationsDbContext>

8
aspnet-core/migrations/LY.MicroService.RealtimeMessage.DbMigrator/EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs → aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsDbContextFactory.cs

@ -1,8 +1,9 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.RealtimeMessage.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore;
public class RealtimeMessageMigrationsDbContextFactory : IDesignTimeDbContextFactory<RealtimeMessageMigrationsDbContext>
{
@ -20,9 +21,8 @@ public class RealtimeMessageMigrationsDbContextFactory : IDesignTimeDbContextFac
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false)
.AddJsonFile("appsettings.Development.json", optional: true);
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.RealtimeMessage.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}

34
aspnet-core/migrations/LY.MicroService.RealtimeMessage.EntityFrameworkCore/RealtimeMessageMigrationsEntityFrameworkCoreModule.cs

@ -0,0 +1,34 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.MessageService.EntityFrameworkCore;
using LINGYUN.Abp.Notifications.EntityFrameworkCore;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
namespace LY.MicroService.RealtimeMessage.EntityFrameworkCore;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(AbpNotificationsEntityFrameworkCoreModule),
typeof(AbpMessageServiceEntityFrameworkCoreModule),
typeof(AbpDataDbMigratorModule)
)]
public class RealtimeMessageMigrationsEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<RealtimeMessageMigrationsDbContext>();
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

5
aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/LY.MicroService.TaskManagement.DbMigrator.csproj

@ -46,10 +46,7 @@
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.TaskManagement.EntityFrameworkCore\LINGYUN.Abp.TaskManagement.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Migrations\" />
<ProjectReference Include="..\LY.MicroService.TaskManagement.EntityFrameworkCore\LY.MicroService.TaskManagement.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

270
aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs

@ -1,270 +0,0 @@
// <auto-generated />
using System;
using LY.MicroService.TaskManagement.DbMigrator.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.TaskManagement.DbMigrator.Migrations
{
[DbContext(typeof(TaskManagementMigrationsDbContext))]
partial class TaskManagementMigrationsDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsEnabled")
.HasColumnType("tinyint(1)");
b.Property<string>("JobId")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("varchar(255)")
.HasColumnName("JobId");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime(6)")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnName("Name");
b.Property<string>("Paramters")
.HasColumnType("longtext")
.HasColumnName("Paramters");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("Name");
b.ToTable("TK_BackgroundJobActions", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobInfo", b =>
{
b.Property<string>("Id")
.HasColumnType("varchar(255)");
b.Property<string>("Args")
.HasColumnType("longtext")
.HasColumnName("Args");
b.Property<DateTime>("BeginTime")
.HasColumnType("datetime(6)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<string>("Cron")
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasColumnName("Cron");
b.Property<string>("Description")
.HasMaxLength(255)
.HasColumnType("varchar(255)")
.HasColumnName("Description");
b.Property<DateTime?>("EndTime")
.HasColumnType("datetime(6)");
b.Property<string>("ExtraProperties")
.HasColumnType("longtext")
.HasColumnName("ExtraProperties");
b.Property<string>("Group")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasColumnName("Group");
b.Property<int>("Interval")
.HasColumnType("int");
b.Property<bool>("IsAbandoned")
.HasColumnType("tinyint(1)");
b.Property<bool>("IsEnabled")
.HasColumnType("tinyint(1)");
b.Property<int>("JobType")
.HasColumnType("int");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime(6)")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<DateTime?>("LastRunTime")
.HasColumnType("datetime(6)");
b.Property<int>("LockTimeOut")
.HasColumnType("int");
b.Property<int>("MaxCount")
.HasColumnType("int");
b.Property<int>("MaxTryCount")
.HasColumnType("int");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnName("Name");
b.Property<DateTime?>("NextRunTime")
.HasColumnType("datetime(6)");
b.Property<string>("NodeName")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("NodeName");
b.Property<int>("Priority")
.HasColumnType("int");
b.Property<string>("Result")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasColumnName("Result");
b.Property<int>("Source")
.HasColumnType("int");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");
b.Property<int>("TriggerCount")
.HasColumnType("int");
b.Property<int>("TryCount")
.HasColumnType("int");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasColumnName("Type");
b.HasKey("Id");
b.HasIndex("Name", "Group");
b.ToTable("TK_BackgroundJobs", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobLog", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
b.Property<string>("Exception")
.HasMaxLength(2000)
.HasColumnType("varchar(2000)")
.HasColumnName("Exception");
b.Property<string>("JobGroup")
.HasMaxLength(50)
.HasColumnType("varchar(50)")
.HasColumnName("JobGroup");
b.Property<string>("JobId")
.HasMaxLength(255)
.HasColumnType("varchar(255)")
.HasColumnName("JobId");
b.Property<string>("JobName")
.HasMaxLength(100)
.HasColumnType("varchar(100)")
.HasColumnName("JobName");
b.Property<string>("JobType")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasColumnName("JobType");
b.Property<string>("Message")
.HasMaxLength(1000)
.HasColumnType("varchar(1000)")
.HasColumnName("Message");
b.Property<DateTime>("RunTime")
.HasColumnType("datetime(6)");
b.Property<Guid?>("TenantId")
.HasColumnType("char(36)")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("JobGroup", "JobName");
b.ToTable("TK_BackgroundJobLogs", (string)null);
});
#pragma warning restore 612, 618
}
}
}

16
aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.Configure.cs

@ -1,18 +1,4 @@
using LY.MicroService.TaskManagement.DbMigrator.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
namespace LY.MicroService.TaskManagement.DbMigrator;
namespace LY.MicroService.TaskManagement.DbMigrator;
public partial class TaskManagementDbMigratorModule
{
private void ConfigureDbContext(IServiceCollection services)
{
services.AddAbpDbContext<TaskManagementMigrationsDbContext>();
// 配置Ef
Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
});
}
}

21
aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/TaskManagementDbMigratorModule.cs

@ -1,29 +1,14 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LINGYUN.Abp.TaskManagement.EntityFrameworkCore;
using LY.MicroService.TaskManagement.EntityFrameworkCore;
using Volo.Abp.Autofac;
using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
namespace LY.MicroService.TaskManagement.DbMigrator;
[DependsOn(
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(TaskManagementEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreMySQLModule),
typeof(AbpDataDbMigratorModule),
typeof(TaskManagementMigrationsEntityFrameworkCoreModule),
typeof(AbpAutofacModule)
)]
public partial class TaskManagementDbMigratorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureDbContext(context.Services);
}
}

3
aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
</Weavers>

30
aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<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>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</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 in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

28
aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/LY.MicroService.TaskManagement.EntityFrameworkCore.csproj

@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\configureawait.props" />
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>LY.MicroService.TaskManagement.EntityFrameworkCore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftPackageVersion)">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySql" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\modules\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\saas\LINGYUN.Abp.Saas.EntityFrameworkCore\LINGYUN.Abp.Saas.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\modules\task-management\LINGYUN.Abp.TaskManagement.EntityFrameworkCore\LINGYUN.Abp.TaskManagement.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

4
aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Migrations/20230112021621_Initial-Task-Management.Designer.cs → aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.Designer.cs

@ -1,6 +1,6 @@
// <auto-generated />
using System;
using LY.MicroService.TaskManagement.DbMigrator.EntityFrameworkCore;
using LY.MicroService.TaskManagement.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
@ -9,7 +9,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.TaskManagement.DbMigrator.Migrations
namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations
{
[DbContext(typeof(TaskManagementMigrationsDbContext))]
[Migration("20230112021621_Initial-Task-Management")]

2
aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/Migrations/20230112021621_Initial-Task-Management.cs → aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/20230112021621_Initial-Task-Management.cs

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

4
aspnet-core/services/LY.MicroService.TaskManagement.HttpApi.Host/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs → aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/Migrations/TaskManagementMigrationsDbContextModelSnapshot.cs

@ -8,7 +8,7 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace LY.MicroService.TaskManagement.Migrations
namespace LY.MicroService.TaskManagement.EntityFrameworkCore.Migrations
{
[DbContext(typeof(TaskManagementMigrationsDbContext))]
partial class TaskManagementMigrationsDbContextModelSnapshot : ModelSnapshot
@ -18,7 +18,7 @@ namespace LY.MicroService.TaskManagement.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
.HasAnnotation("ProductVersion", "6.0.6")
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("LINGYUN.Abp.TaskManagement.BackgroundJobAction", b =>

13
aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/EntityFrameworkCore/TaskManagementDbMigrationService.cs → aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementDbMigrationService.cs

@ -3,13 +3,18 @@ using LINGYUN.Abp.Saas.Tenants;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
namespace LY.MicroService.TaskManagement.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.TaskManagement.EntityFrameworkCore;
public class TaskManagementDbMigrationService : ITransientDependency
{
@ -81,7 +86,7 @@ public class TaskManagementDbMigrationService : ITransientDependency
Logger.LogInformation("You can safely end this process...");
}
private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null)
private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null)
{
Logger.LogInformation($"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database...");
// 迁移租户数据
@ -94,7 +99,7 @@ public class TaskManagementDbMigrationService : ITransientDependency
});
}
private async Task SeedDataAsync(Tenant? tenant = null)
private async Task SeedDataAsync(Tenant tenant = null)
{
Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");
@ -190,7 +195,7 @@ public class TaskManagementDbMigrationService : ITransientDependency
return Path.Combine(slnDirectoryPath, "LY.MicroService.TaskManagement.DbMigrator");
}
private string? GetSolutionDirectoryPath()
private string GetSolutionDirectoryPath()
{
var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());

2
aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/EntityFrameworkCore/TaskManagementMigrationsDbContext.cs → aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContext.cs

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace LY.MicroService.TaskManagement.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.TaskManagement.EntityFrameworkCore;
[ConnectionStringName("TaskManagementDbMigrator")]
public class TaskManagementMigrationsDbContext : AbpDbContext<TaskManagementMigrationsDbContext>

8
aspnet-core/migrations/LY.MicroService.TaskManagement.DbMigrator/EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs → aspnet-core/migrations/LY.MicroService.TaskManagement.EntityFrameworkCore/TaskManagementMigrationsDbContextFactory.cs

@ -1,8 +1,9 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace LY.MicroService.TaskManagement.DbMigrator.EntityFrameworkCore;
namespace LY.MicroService.TaskManagement.EntityFrameworkCore;
public class TaskManagementMigrationsDbContextFactory : IDesignTimeDbContextFactory<TaskManagementMigrationsDbContext>
{
@ -20,9 +21,8 @@ public class TaskManagementMigrationsDbContextFactory : IDesignTimeDbContextFact
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false)
.AddJsonFile("appsettings.Development.json", optional: true);
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../LY.MicroService.TaskManagement.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save