[PR #3589] [MERGED] Check that migrationsMeta table is well formed instead of just existing #4026

Closed
opened 2026-04-25 00:18:01 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3589
Author: @nichwall
Created: 11/7/2024
Status: Merged
Merged: 11/7/2024
Merged by: @advplyr

Base: masterHead: migration_table_check_fix


📝 Commits (1)

  • 41fe537 Add: check that migrationsMeta table is well formed

📊 Changes

1 file changed (+14 additions, -0 deletions)

View changed files

📝 server/managers/MigrationManager.js (+14 -0)

📄 Description

If the rows do not exist, the migration manager crashes.

This fixes https://github.com/advplyr/audiobookshelf/issues/3588 by checking that both version and maxVersion are defined in the migrationsMeta. This PR drops the table and triggers the creation of the migrationsMeta table again if either row is missing.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/3589 **Author:** [@nichwall](https://github.com/nichwall) **Created:** 11/7/2024 **Status:** ✅ Merged **Merged:** 11/7/2024 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `migration_table_check_fix` --- ### 📝 Commits (1) - [`41fe537`](https://github.com/advplyr/audiobookshelf/commit/41fe5373a7096fc050962acb7eaf1522d5fd5d43) Add: check that `migrationsMeta` table is well formed ### 📊 Changes **1 file changed** (+14 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/managers/MigrationManager.js` (+14 -0) </details> ### 📄 Description If the rows do not exist, the migration manager crashes. This fixes https://github.com/advplyr/audiobookshelf/issues/3588 by checking that both `version` and `maxVersion` are defined in the `migrationsMeta`. This PR drops the table and triggers the creation of the `migrationsMeta` table again if either row is missing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:18:01 +02:00
adam closed this issue 2026-04-25 00:18:01 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4026