[PR #874] [MERGED] feat: support automatic db migration rollbacks #577

Closed
opened 2025-10-08 00:13:16 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/874
Author: @stonith404
Created: 8/24/2025
Status: Merged
Merged: 8/24/2025
Merged by: @stonith404

Base: mainHead: feat/support-migration-rollback


📝 Commits (3)

  • ed5e07e feat: support automatic db migration rollbacks
  • c5670eb use uint in log message
  • c931451 add ALLOW_DOWNGRADE env variable

📊 Changes

4 files changed (+80 additions, -5 deletions)

View changed files

📝 backend/go.mod (+3 -0)
📝 backend/go.sum (+16 -0)
📝 backend/internal/bootstrap/db_bootstrap.go (+59 -5)
📝 backend/internal/common/env_config.go (+2 -0)

📄 Description

This PR adds support for automatic rollbacks of database migrations when the user downgrades to a older release. Pocket ID fetches the necessary "down migrations" from GitHub because they are obviously not included in the older versions.


🔄 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/pocket-id/pocket-id/pull/874 **Author:** [@stonith404](https://github.com/stonith404) **Created:** 8/24/2025 **Status:** ✅ Merged **Merged:** 8/24/2025 **Merged by:** [@stonith404](https://github.com/stonith404) **Base:** `main` ← **Head:** `feat/support-migration-rollback` --- ### 📝 Commits (3) - [`ed5e07e`](https://github.com/pocket-id/pocket-id/commit/ed5e07e0afbac8dbcda3a73173d247a917d01c4d) feat: support automatic db migration rollbacks - [`c5670eb`](https://github.com/pocket-id/pocket-id/commit/c5670ebca0f6ec8d4ebd244e4f8d9b92a1463f5a) use uint in log message - [`c931451`](https://github.com/pocket-id/pocket-id/commit/c9314517a3a42ec1bfab1bc70c7f7bbc6cc878b3) add `ALLOW_DOWNGRADE` env variable ### 📊 Changes **4 files changed** (+80 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `backend/go.mod` (+3 -0) 📝 `backend/go.sum` (+16 -0) 📝 `backend/internal/bootstrap/db_bootstrap.go` (+59 -5) 📝 `backend/internal/common/env_config.go` (+2 -0) </details> ### 📄 Description This PR adds support for automatic rollbacks of database migrations when the user downgrades to a older release. Pocket ID fetches the necessary "down migrations" from GitHub because they are obviously not included in the older versions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-08 00:13:16 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-1#577