Skip to content

Conversation

lunny
Copy link
Member

@lunny lunny commented Jul 21, 2025

This PR upgrade xorm to v1.3.10 which fixed a bug when both longtext json tags in the struct field. The longtext will be ignored and json will be considered as text.

A migration has been introduced to modify the column directly to longtext. And another two columns should also be migrated from text to longtext.

All these changes only affect mysql database because for other databases Gitea supported, text is the same as longtext.

Fix #27244
Fix #34764
Fix #35042

@lunny lunny added the type/bug label Jul 21, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 21, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jul 21, 2025
@hiifong
Copy link
Member

hiifong commented Jul 22, 2025

No sqlite support?

migration[321]: Fix review_state.updated_files column failed: near "MODIFY": syntax error

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jul 22, 2025
@wxiaoguang
Copy link
Contributor

And, should it also include a fix for "uploading rpm with large metadata fails with mysql/mariadb database #35042" ?

@lunny lunny added this to the 1.25.0 milestone Jul 23, 2025
@lunny
Copy link
Member Author

lunny commented Jul 23, 2025

  • db-tests / test-mysql (pull_request)

SQLite doesn't support to change column type and it's unnecessary to change it for SQLite because TEXT is the same as LONGTEXT in SQLITE.

@lunny lunny changed the title Fix column wrong type caused by xorm Change some columns from text to longtext and fix column wrong type caused by xorm Jul 23, 2025
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 23, 2025
@lunny lunny merged commit 54fe47f into go-gitea:main Jul 24, 2025
26 checks passed
@lunny lunny deleted the lunny/fix_column_define branch July 24, 2025 05:24
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 24, 2025
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 28, 2025
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Fix migrate input box bug (go-gitea#35166)
  [skip ci] Updated translations via Crowdin
  Only hide dropzone when no files have been uploaded (go-gitea#35156)
  Change some columns from text to longtext and fix column wrong type caused by xorm (go-gitea#35141)
  [skip ci] Updated translations via Crowdin
  Add `owner` and `parent` fields clarification to docs (go-gitea#35023)
  Improve language in en-US locale strings (go-gitea#35124)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/dependencies modifies/go Pull requests that update Go code modifies/migrations type/bug
Projects
None yet
6 participants