closes #12701 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved error handling during migration rollbacks to prevent unnecessary errors when migrations were never applied. <!-- end of auto-generated comment: release notes by coderabbit.ai -->