Browse Source

add entity-framework core quick migration script

pull/79/head
cKey 5 years ago
parent
commit
7ce6a122f0
  1. 5
      aspnet-core/services/start-apigateway-admin.bat
  2. 5
      aspnet-core/services/start-auth-server.bat
  3. 5
      aspnet-core/services/start-backend-admin.bat
  4. 5
      aspnet-core/services/start-messages.bat
  5. 5
      aspnet-core/services/start-platform.bat
  6. 11
      build/build-aspnetcore-ef-update.ps1

5
aspnet-core/services/start-apigateway-admin.bat

@ -9,6 +9,7 @@ cd .\apigateway\LINGYUN.ApiGateway.HttpApi.Host
if '%1' equ '--publish' goto publish
if '%1' equ '--run' goto run
if '%1' equ '--restore' goto restore
if '%1' equ '--ef-u' goto efu
if '%1' equ '' goto run
@ -24,3 +25,7 @@ exit
:restore
dotnet restore
exit
:efu
dotnet ef database update
exit

5
aspnet-core/services/start-auth-server.bat

@ -9,6 +9,7 @@ cd .\account\AuthServer.Host
if '%1' equ '--publish' goto publish
if '%1' equ '--run' goto run
if '%1' equ '--restore' goto restore
if '%1' equ '--ef-u' goto efu
if '%1' equ '' goto run
exit
@ -24,3 +25,7 @@ exit
:restore
dotnet restore
exit
:efu
dotnet ef database update
exit

5
aspnet-core/services/start-backend-admin.bat

@ -9,6 +9,7 @@ cd .\admin\LINGYUN.BackendAdminApp.Host
if '%1' equ '--publish' goto publish
if '%1' equ '--run' goto run
if '%1' equ '--restore' goto restore
if '%1' equ '--ef-u' goto efu
if '%1' equ '' goto run
exit
@ -24,3 +25,7 @@ exit
:restore
dotnet restore
exit
:efu
dotnet ef database update
exit

5
aspnet-core/services/start-messages.bat

@ -9,6 +9,7 @@ cd .\messages\LINGYUN.Abp.MessageService.HttpApi.Host
if '%1' equ '--publish' goto publish
if '%1' equ '--run' goto run
if '%1' equ '--restore' goto restore
if '%1' equ '--ef-u' goto efu
if '%1' equ '' goto run
exit
@ -24,3 +25,7 @@ exit
:restore
dotnet restore
exit
:efu
dotnet ef database update
exit

5
aspnet-core/services/start-platform.bat

@ -9,6 +9,7 @@ cd .\platform\LINGYUN.Platform.HttpApi.Host
if '%1' equ '--publish' goto publish
if '%1' equ '--run' goto run
if '%1' equ '--restore' goto restore
if '%1' equ '--ef-u' goto efu
if '%1' equ '' goto run
exit
@ -24,3 +25,7 @@ exit
:restore
dotnet restore
exit
:efu
dotnet ef databse update
exit

11
build/build-aspnetcore-ef-update.ps1

@ -0,0 +1,11 @@
. "./build-aspnetcore-common.ps1"
# Build all solutions
foreach ($batchCommandPath in $batchCommandPaths) {
$file = [io.fileinfo]$batchCommandPath;
Write-Host $file.DirectoryName
Set-Location $file.DirectoryName
CMD /c $file.Name --ef-u -Wait
}
Set-Location $rootFolder
Loading…
Cancel
Save