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

Add missing sorting column in project_issue table #19635

Merged
merged 1 commit into from
May 6, 2022

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented May 6, 2022

The column sorting was missing in the model (well, it's lost during refactoring)

It would cause problems for a fresh installation: there will be no such column in table and users meet SQL errors.

This PR adds the missing column, close #19332

@wxiaoguang wxiaoguang added type/bug skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels May 6, 2022
@wxiaoguang wxiaoguang added this to the 1.17.0 milestone May 6, 2022
Copy link
Contributor

@zeripath zeripath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is OK without a migration.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label May 6, 2022
@zeripath
Copy link
Contributor

zeripath commented May 6, 2022

does this need an index?

@wxiaoguang
Copy link
Contributor Author

I think this is OK without a migration.

The migration code was correct. 1.16 was also correct. The column was lost during refactoring.

does this need an index?

No (IMO), there won't be too many rows for one board, not worth to introduce the index (ProjectBoardID, Sorting) at the moment.

@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 May 6, 2022
@wxiaoguang
Copy link
Contributor Author

Some more topic: about refactoring, I would to propose:

  1. I always support refactoring
  2. The team could have consensus about refactoring
  3. Every refactoring should be done (merged) in several days after the work, instead of blocking for a long time, then conflicts come, code lose, etc.

I have seen code lose many times, most (all) of them are caused by long-time blocking, no consensus, nobody reviews, no progress, then bug occurs.

@lunny lunny merged commit 994257d into go-gitea:main May 6, 2022
@wxiaoguang wxiaoguang deleted the fix-project-issue-sorting branch May 6, 2022 14:41
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 8, 2022
* giteaofficial/main:
  Delete related PullAutoMerge and ReviewState on User/Repo Deletion (go-gitea#19649)
  Allow custom default merge message with .gitea/default_merge_message/<merge_style>_TEMPLATE.md (go-gitea#18177)
  Allow to mark files in a PR as viewed (go-gitea#19007)
  Auto merge pull requests when all checks succeeded via API (go-gitea#9307)
  Hide private repositories in packages (go-gitea#19584)
  Only show accessible teams in dashboard dropdown list (go-gitea#19642)
  prevent double click new issue/pull/comment button (go-gitea#16157)
  Improve reviewing PR UX (go-gitea#19612)
  [skip ci] Updated translations via Crowdin
  Add Changelog v1.16.7 (go-gitea#19575) (go-gitea#19644)
  Set safe dir for git operations in .drone.yml CI (go-gitea#19641)
  Add missing `sorting` column in `project_issue` table (go-gitea#19635)
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 24, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Model ProjectIssue is out of sync, lacking field Sorting
4 participants