Open Closed

While Migrating from 6.0.3 to 7.0.0, DbMigrator is throwing exceptions #4573


User avatar
0
Repunjay created
  • ABP Framework version: v7.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

While Migration Dotnet Core Solution ABP version from 6.0.3 to 7.0.0, as per migration guide abp is adding 2 new tables, so while running DbMigrator Project after changing the .Net framework version 7 and ABP Version to 7.0.0, I am getting below errors.

Note: Solution is upgraded to OpenIdDict.


6 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Hi, you can add options.AddDataMigrationEnvironment(); to the DbMigratorHostedService like:

    https://github.com/abpframework/abp/blob/dev/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/DbMigratorHostedService.cs#L31

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    And need to check if all volo packages are upgraded to 7.0.0.

    Also run abp clean and dotnet build command

  • User Avatar
    0
    Repunjay created

    Hi,

    Hi, you can add options.AddDataMigrationEnvironment(); to the DbMigratorHostedService like:

    https://github.com/abpframework/abp/blob/dev/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/DbMigratorHostedService.cs#L31

    After adding this line of code, DbMigrations are done, but when I ran my solution I am getting below.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi.

    Can you share the error log? thanks.

  • User Avatar
    0
    Repunjay created

    Hi.

    Can you share the error log? thanks.

    log files are not generating

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Can you share a project that can reproduce the problem with me? shiwei.liang@volosoft.com I will check it

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35