[PR #3418] [MERGED] Fix MigrationManager initial run behavior #3970

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

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3418
Author: @mikiher
Created: 9/14/2024
Status: Merged
Merged: 9/14/2024
Merged by: @advplyr

Base: masterHead: fix-database-version-init


📝 Commits (2)

  • 5516480 Fix migrationMeta database version initial value, and move isDatabaseNew logic inside MigrationManager
  • 21c77dc Add server migration scripts to pkg assets

📊 Changes

4 files changed (+87 additions, -17 deletions)

View changed files

📝 package.json (+2 -1)
📝 server/Database.js (+2 -2)
📝 server/managers/MigrationManager.js (+21 -3)
📝 test/server/managers/MigrationManager.test.js (+62 -11)

📄 Description

This fixes #3415 more comprehensively.

  • The initial value for databaseVersion is fixed
  • The isNewDatabase logic was pushed inside MigrationManager, with new tests added
  • Usage of MigrationManager becomes simpler (construct, init, runMigrations unconditionally)

🔄 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/3418 **Author:** [@mikiher](https://github.com/mikiher) **Created:** 9/14/2024 **Status:** ✅ Merged **Merged:** 9/14/2024 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `fix-database-version-init` --- ### 📝 Commits (2) - [`5516480`](https://github.com/advplyr/audiobookshelf/commit/55164803b07222467d1bfaf88ab08f8ebe32391d) Fix migrationMeta database version initial value, and move isDatabaseNew logic inside MigrationManager - [`21c77dc`](https://github.com/advplyr/audiobookshelf/commit/21c77dccce3acffcd66c38365bcd00d4274f7edf) Add server migration scripts to pkg assets ### 📊 Changes **4 files changed** (+87 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `package.json` (+2 -1) 📝 `server/Database.js` (+2 -2) 📝 `server/managers/MigrationManager.js` (+21 -3) 📝 `test/server/managers/MigrationManager.test.js` (+62 -11) </details> ### 📄 Description This fixes #3415 more comprehensively. - The initial value for databaseVersion is fixed - The isNewDatabase logic was pushed inside MigrationManager, with new tests added - Usage of MigrationManager becomes simpler (construct, init, runMigrations unconditionally) --- <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:17:46 +02:00
adam closed this issue 2026-04-25 00:17:46 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3970