Hello everyone,
I'm encountering an issue with Backstage where it throws the following error:
Unhandled rejection The migration directory is corrupt, the following files are missing: 20240712211735_nullable_next_run.js
The full error stack is:
Unhandled rejection The migration directory is corrupt, the following files are missing: 20240712211735_nullable_next_run.js
at validateMigrationList (node_modules/knex/lib/migrations/migrate/Migrator.js:567:11)
at Migrator.latest (node_modules/knex/lib/migrations/migrate/Migrator.js:69:7)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at migrateBackendTasks (node_modules/@backstage/backend-defaults/src/entrypoints/scheduler/database/migrateBackendTasks.ts:27:9)
at PluginTaskSchedulerImpl.<anonymous> (node_modules/@backstage/backend-defaults/src/entrypoints/scheduler/lib/DefaultSchedulerService.ts:42:9)
It appears that Backstage is unable to find a specific migration file, which results in this error. I would appreciate any advice on how to resolve this issue or pointers on what might be causing it.
I wanted to know why these errors usually occur and how to fix them without having to access the database.
Thanks in advance for your help!