Open Closed

Rollback from ABP 9 to ABP 8 failed #9452


User avatar
0
DominaTang created

We rolled back our QA site from ABP 9 to ABP8:

  1. Restore database backup prier to ABP 9 upgrade
  2. Deploy code back to ABP 8.2.3 version

However, when login page, it keeps giving us 500 error in login page, from exception below, obviously in ABP 9 these columns are dropped, but ABP 8 table has it. We check the code deployed to app container, the ABP version is 8.2.3. We delete the redis cache pod, and create a new one, the error is still there.

[17:21:29 ERR] An unhandled exception has occurred while executing the request. Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid column name 'IsDeleted'. Invalid column name 'CreationTime'. Invalid column name 'CreatorId'. Invalid column name 'DeleterId'. Invalid column name 'DeletionTime'. Invalid column name 'IsDeleted'. Invalid column name 'LastModificationTime'. Invalid column name 'LastModifierId'. at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__195_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable1.AsyncEnumerator.MoveNextAsync() at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken) at Volo.Abp.OpenIddict.Authorizations.EfCoreOpenIddictAuthorizationRepository.FindAsync(String subject, Guid client, String status, String type, CancellationToken cancellationToken)


1 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent

    To successfully roll back from ABP 9 to ABP 8, you must ensure that both your application code and your database schema are fully reverted to their ABP 8 state. The error you are seeing indicates a schema mismatch: your ABP 8.2.3 code expects columns like IsDeleted, CreationTime, etc., but your database is missing them—likely because the ABP 9 migration dropped or altered these columns.

    Here’s how to resolve this:

    1. Restore the Database:

      • You must restore the database backup that was taken before the ABP 9 upgrade. This ensures the schema matches what ABP 8 expects.
      • If you already restored the backup, double-check that the restore completed successfully and that you are connecting to the correct database instance.
    2. Clear All Caches:

      • You already restarted the Redis cache, which is good.
      • Also clear any other distributed caches or in-memory caches that might be holding old schema or metadata.
    3. Verify Connection Strings:

      • Ensure your ABP 8.2.3 application is pointing to the restored (pre-ABP 9) database, not a database that was migrated to ABP 9.
    4. Check for Shadow Migrations:

      • If any migrations were applied after the ABP 9 upgrade, make sure those are not present in your database.
    5. Rebuild and Redeploy:

      • Rebuild your ABP 8.2.3 solution and redeploy all services to ensure no ABP 9 binaries or configuration remain.
    6. Troubleshooting:

      • If the error persists, use SQL Server Management Studio (or your DB tool) to inspect the relevant tables (such as OpenIddict tables) and confirm that all columns expected by ABP 8 are present.
      • If columns are missing, the database restore may not have completed or the wrong backup was used.

    If you follow these steps and ensure both code and database are in sync for ABP 8, the error should be resolved.

    Sources:

    • https://abp.io/docs/latest/release-info/migration-guides/abp-9-0
    • https://abp.io/docs/8.0/Migration-Guides/Abp-8_0

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on June 13, 2025, 11:37