Open Closed

DBMigrator for rollback #248


User avatar
0
chanchai-mwp created
  • ABP Framework version: v2.9.0
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): yes

EntityFrameworkCore.Migrations

public partial class Initial : Migration
{
        protected override void Up(MigrationBuilder migrationBuilder)
        {
        }
        protected override void Down(MigrationBuilder migrationBuilder)
        {
        }
}

We use your DBMigrator console to migrate db (Up() method) for multi tenants..

Do you know how to run the DBMigrator for rollback (Down() method) for multi tenants?


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

    HI,

    DBMigrator does not support rollback. You can use ef core command to rollback database. see https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet#dotnet-ef-migrations-script.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I close this question, If you still have this question, Please reopen. (When using the command to roll back the database, you need to change the connection string to the connection string of the tenant)

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 10, 2025, 06:30