-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Refactor the DB migration system slightly #32344
Merged
Merged
+379
−568
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
5a957d3
to
7e5e1c1
Compare
lunny
approved these changes
Oct 26, 2024
denyskon
approved these changes
Oct 27, 2024
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Oct 28, 2024
* giteaofficial/main: Fix db engine (go-gitea#32351) Refactor the DB migration system slightly (go-gitea#32344)
silverwind
added a commit
to silverwind/gitea
that referenced
this pull request
Oct 30, 2024
* origin/main: (21 commits) Fix toAbsoluteLocaleDate and add more tests (go-gitea#32387) Respect UI.ExploreDefaultSort setting again (go-gitea#32357) Fix absolute-date (go-gitea#32375) Fix undefined errors on Activity page (go-gitea#32378) Add new [lfs_client].BATCH_SIZE and [server].LFS_MAX_BATCH_SIZE config settings. (go-gitea#32307) remove unused call to $.HeadRepo in view_title template (go-gitea#32317) Fix clean tmp dir (go-gitea#32360) Optimize branch protection rule loading (go-gitea#32280) Suggestions for issues (go-gitea#32327) Migrate vue components to setup (go-gitea#32329) Fix db engine (go-gitea#32351) Refactor the DB migration system slightly (go-gitea#32344) Fix broken image when editing comment with non-image attachments (go-gitea#32319) Fix disable 2fa bug (go-gitea#32320) Upgrade rollup to 4.24.0 (go-gitea#32312) Upgrade vue to 3.5.12 (go-gitea#32311) Make admins adhere to branch protection rules (go-gitea#32248) Prevent from submitting issue/comment on uploading (go-gitea#32263) Add warn log when deleting inactive users (go-gitea#32318) Add `DISABLE_ORGANIZATIONS_PAGE` and `DISABLE_CODE_PAGE` settings for explore pages and fix an issue related to user search (go-gitea#32288) ...
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Labels
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
modifies/go
Pull requests that update Go code
modifies/migrations
size/XL
Denotes a PR that changes 500-999 lines, ignoring generated files.
type/refactoring
Existing code has been cleaned up. There should be no new functionality.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There were many attempts to make the DB migration system better, but there are also various blockers.
To reduce the risks and make the DB migration system easier to maintain and/or be replaced, I think this PR is a necessary start.
It introduces "idNumber" for each migration, and clarify the difference between the migration ID number and database version.
The screenshot shows that the migration id number does match the database version in table: