Starts in:
2 DAYS
20 HRS
12 MIN
21 SEC
Starts in:
2 D
20 H
12 M
21 S
Open Closed

8.1.4 to 8.2.0 delta migrations #7516


User avatar
1
tuk created
  • ABP Framework version: v8.1.4
  • UI Type: Blazor Server
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no

Hello We just started a new project on 8.1.4 a few weeks ago, and now we need to update to 8.2.0. However we do not find any easy way to do the DB migration.

We expected there to be new migration steps to apply, but instead we just get one big initial migration, which will not work on an existing DB.

How do we obtain the delta migration steps (8.1.4 to 8.2.0) to apply to our DB?

We have searched documentation, but did not find anything on how to do this.


9 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can add a new ef core migration(dotnet ef migration add abp_82)

    What are your current migration files? Can you share a screenshot?

    eg:

  • User Avatar
    0
    tuk created

    I have this in my migration folder after updating to 8.2.0, how to apply new migration relevant to 8.2.0?

    I mean how to generate the migration code to update DB to new schema used with 8.2.0?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    You should have some migration files on 8.1.4

    Then you can add a new migration file after upgradeing to 8.2.0

  • User Avatar
    0
    tuk created

    So you do not provide the migration code files to upgrade from 8.1.4 to 8.2.0 I should figure out all changes myself and create migration files manually?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can use EF Core CLI to add a new migration file.

    https://learn.microsoft.com/en-us/ef/core/cli/dotnet https://learn.microsoft.com/en-us/ef/core/managing-schemas/migrations/managing?tabs=dotnet-core-cli#add-a-migration https://learn.microsoft.com/en-us/ef/core/managing-schemas/

  • User Avatar
    0
    tuk created

    I think you misunderstand. In 8.2.0, there are new tables, how do I get the migration file to generate those tables? I have no files in my folder after fetching new version I only have a initial file with all table creation. But I already have a DB so I just need the changes from 8.1.4 to 8.2.0. For example in ASP.Net Zero you provide migration files for each update.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Where is your 8.1.4 project?

    You should run dotnet ef migrations add command in your old project after upgrading to 8.2.0.

  • User Avatar
    0
    tuk created

    Hi Got it now, thanks.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ; )

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06