Base solution for your next web application
Open Closed

Production Server Migration #8138


User avatar
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)
  • User Avatar
    0
    maliming created
    Support Team

    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

  • User Avatar
    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.

  • User Avatar
    0
    maliming created
    Support Team

    Migrator.exe is an executable file.

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

  • User Avatar
    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 ?

  • User Avatar
    0
    ismcagdas created
    Support Team

    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.

  • User Avatar
    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.

  • User Avatar
    0
    maliming created
    Support Team

    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
    
  • User Avatar
    0
    RiskAvert created

    Still I could not found exe file.

  • User Avatar
    1
    maliming created
    Support Team

    hi RiskAvert

    Try the following command

    dotnet publish -c Release -r win10-x64
    
  • User Avatar
    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.

  • User Avatar
    0
    maliming created
    Support Team

    @RiskAvert

    Can I see it remotely? Please send teamviewer connection information to [email protected]

  • User Avatar
    1
    maliming created
    Support Team

    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/