Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
CirnoT opened this issue Oct 12, 2020 · 2 comments
Closed
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@CirnoT
Copy link
Contributor

CirnoT commented 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.

@6543
Copy link
Member

6543 commented 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 6543 added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Oct 12, 2020
@zeripath
Copy link
Contributor

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

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests

3 participants