Gitea should prohibit restoring backup of older schema than currently installed #6132

Closed
opened 2025-11-02 06:45:57 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @CirnoT on GitHub (Oct 12, 2020).

Backup should store its schema version and restore tool should not allow restoring data onto already existing database schema that is of newer version that that of backup.

Such action results in data being migrated without necessary migrations. User should be advised to restore backup on the same version of Gitea as it was made to, and only then upgrade to newer version.

Originally created by @CirnoT on GitHub (Oct 12, 2020). Backup should store its schema version and restore tool should not allow restoring data onto already existing database schema that is of newer version that that of backup. Such action results in data being migrated without necessary migrations. User should be advised to restore backup on the same version of Gitea as it was made to, and only then upgrade to newer version.
GiteaMirror added the type/question label 2025-11-02 06:45:57 -06:00
Author
Owner

@6543 commented on GitHub (Oct 12, 2020):

@CirnoT we have no restore command at the the moment

and since #12760 we do store database version within the dump
☝️ this will auto-migrate after dump was restored if nessecary

and with #13108 a check for dump-shema newer than gitea is also handled

@6543 commented on GitHub (Oct 12, 2020): @CirnoT we have no restore command at the the moment and since #12760 we do store database version within the dump :point_up: this will auto-migrate after dump was restored if nessecary and with #13108 a check for dump-shema newer than gitea is also handled
Author
Owner

@zeripath commented on GitHub (Oct 12, 2020):

I think now we store the version in the version table that we're safe now. Therefore I think this issue can be closed.

@zeripath commented on GitHub (Oct 12, 2020): I think now we store the version in the version table that we're safe now. Therefore I think this issue can be closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6132