Base solution for your next web application
Open Closed

DB Migration on Linux Server #11728


User avatar
0
osweater created

Hi all,

I've deployed the project to Linux using docker compose, the only problem I'm facing is the DB migration since I can't find the Migrator.exe file. I tried to use the run-migrator.ps1 script but I got this error while building the image:

 => ERROR [mycompanyname.abpzerotemplate.migrator build  7/10] RUN dotnet restore "src/Bone.Migrator/Bone.Migrator.csproj"                                                                                 1.4s
------
 > [mycompanyname.abpzerotemplate.migrator build  7/10] RUN dotnet restore "src/Bone.Migrator/Bone.Migrator.csproj":
1.055   Determining projects to restore...
1.252 /usr/share/dotnet/sdk/6.0.414/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 7.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0. [/src/src/Bone.EntityFrameworkCore/Bone.EntityFrameworkCore.csproj]
1.255 /usr/share/dotnet/sdk/6.0.414/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 7.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0. [/src/src/Bone.Core/Bone.Core.csproj]
1.286 /usr/share/dotnet/sdk/6.0.414/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 7.0.  Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0. [/src/src/Bone.Migrator/Bone.Migrator.csproj]
------
failed to solve: process "/bin/sh -c dotnet restore \"src/Bone.Migrator/Bone.Migrator.csproj\"" did not complete successfully: exit code: 1

What is the best way to migrate the production DB when the project is hosted in a Linux machine?

Why I can't find the Migrator.exe file?


1 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @osweater,

    Could you check the migrator docker file?