Open Closed

Production Server Migration #8138


0
RiskAvert created

I want to run update database in production server(VPN-IIS hosting) . I am using ASP core + Angular 8 Template. I had gone through the FAQ, in that i observed options like migration tool and Migrator.exe. But i could not find any steps or detailed document to run/download/use. So Please let me know the best way to update all production server database.


12 Answer(s)
  • 0
    maliming created

    https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Getting-Started-Angular#migrations https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Migrator-Console-Application

  • 0
    RiskAvert created

    "ASP.NET Zero solution includes a .Migrator (like Acme.PhoneBookDemo.Migrator) project in the server side solution. You can run this tool for database migrations on development and production (see migrator docs for more information)." In first doc link, .Migrator is mentioned but how to run that?

    "ASP.NET Zero includes a tool, Migrator.exe, to easily migrate your databases. You can run this application to create/migrate host and tenant databases." In second link, Migrator.exe is mentioned but how to run and where it locates.Below image is my published folder.8138ra query.png

  • 0
    maliming created

    Migrator.exe is an executable file.

    aspnet-core\src\MyCompanyName.AbpZeroTemplate.Migrator\bin\Release\netcoreapp3.0

    image.png

  • 0
    RiskAvert created

    1.But in production we deployed, Publish dlls only not whole project. So how can i update all database in production server. 2.I am using .net core 2.2 and below is my project solution path (aspnet-core\src\Governance.Migrator\bin\Release\netcoreapp2.2) screen shot .But i could not find the EXE file in your mentioned path. Did i missed anything like enabling/disabling ? 8138ra query2.png

  • 0
    ismcagdas created

    Hi @RiskAvert

    You have to transfer output of Migration app to your server manually. When you publish your website, Migrator.exe will not be in that folder. So, think this as a step before publishing your website.

  • 0
    RiskAvert created

    Hi, The last screenshot which i shared is my project solution path (development) only their also i could not found that exe file.

  • 0
    maliming created

    i could not found that exe file.

    Try modify your project file(Governance.Migrator.csproj) and execute the dotnet build command.

    <PropertyGroup>
      <OutputType>Exe</OutputType>
    </PropertyGroup>
    
    src\Governance.Migrator> dotnet build -c Release
    
  • 0
    RiskAvert created

    Still I could not found exe file. 8138ra query 3.png 8138ra query 3a.png

  • 1
    maliming created

    hi RiskAvert

    Try the following command

    dotnet publish -c Release -r win10-x64
    
  • 0
    RiskAvert created

    I have tried with GUI publish ( https://stackoverflow.com/questions/44074121/build-net-core-console-application-to-output-an-exe ) also.But Itz also not working. 8138ra query 4.png

  • 0
    maliming created

    @RiskAvert

    Can I see it remotely? Please send teamviewer connection information to liming.ma@volosoft.com

  • 1
    maliming created

    Resolved remotely.

    Please see the documentation below. https://docs.microsoft.com/en-us/dotnet/core/rid-catalog https://docs.microsoft.com/en-us/dotnet/core/deploying/