Open Closed

Failure to create automatically the Migration when creating new Module using ABP Studio #8697


User avatar
0
chrisalves created

Check the docs before asking a question: https://abp.io/docs/latest
Check the samples to see the basic tasks: https://abp.io/docs/latest/samples
The exact solution to your question may have been answered before, and please first use the search on the homepage.
Provide us with the following info:
🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration button.

  • ABP Framework version: v0,9,22

  • UI Type: Blazor Server

  • Database System: EF Core (SQL Server)

  • Tiered (Yes): yes/no

  • Exception message and full stack trace:

  • Steps to reproduce the issue: Just created a new solution and after that followed the steps to create new module under new folder, import the new module to main application, check install box.
    There are 2 DbContext in the solution (due to Multitenancy) but Studio didn´t define the correct DbContext. I needed to create the Migration manually on Studio after that

image.png

image.png

image.png

image.png


7 Answer(s)
  • User Avatar
    0
    chrisalves created

    Here is the Log of the failure:
    image.png

    <br>

  • User Avatar
    0
    chrisalves created

    Needed to run Graph Build of the solution.
    image.png

    And then, tried to create the Migration using Studio UI but the application doen´t request the DbContext for this Migration. In the former versions it was present in the UI but now it is missing.

    image.png

  • User Avatar
    0
    chrisalves created

    Needed to create the migration manually in the Terminal as picture below:

    image.png

    image.png

    And did run the Database Update running DbMigrator:
    image.png

    The migration was applied to the database:
    image.png

    Please provide a way on ABP Studio to create the migration and update the database correctly

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, thank you for the detailed explanation. We will try to reproduce the problem by following your instructions, then I will let you know about the process.

    Regards.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi again, we reproduced the problem as you stated and created an internal issue (with number 2626) and will fix the problem as soon as possible.

    Best Regards.

  • User Avatar
    0
    chrisalves created

    Hi Engincan, thank you for your return.

    As I have a limited amount of credits in my licensing, considering this is a Bug and will be fixed, please reset this credit Issue counting on my account. Now I have no more credit but when you return me this credit I will be able to open a new ticket in the future.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi Engincan, thank you for your return.

    As I have a limited amount of credits in my licensing, considering this is a Bug and will be fixed, please reset this credit Issue counting on my account. Now I have no more credit but when you return me this credit I will be able to open a new ticket in the future.

    Sure, I have refunded your ticket and closing the question.

    image.png

    Thanks for your understanding. Regards.

Made with ❤️ on ABP v9.2.0-preview. Updated on January 23, 2025, 12:17