mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-11 07:42:58 +03:00
[PR #874] [MERGED] feat: support automatic db migration rollbacks #577
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
main← Head:feat/support-migration-rollback📝 Commits (3)
ed5e07efeat: support automatic db migration rollbacksc5670ebuse uint in log messagec931451addALLOW_DOWNGRADEenv 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.