-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Do not store user projects as organization projects #23353
Do not store user projects as organization projects #23353
Conversation
And should we correct the error history types? |
This comment was marked as off-topic.
This comment was marked as off-topic.
Or we can merge the two types as one. Because there is no difference between them. |
If we merge the two types as one, when we want to check org/individual project type, we need to call (Edited) Is there a better way to check org/individual project type? |
We can store the type of project inside the db when creating it? As there is no |
We already store the type of project inside the db when creating it. We have three project types in current design: gitea/models/project/project.go Lines 38 to 47 in 608a3ee
But when creating projects, we store TypeOrganization to both Individual and Organization Projects. This PR will fix this problem.
But before simply using Lines 38 to 44 in 2dc4f80
At first, I think I think this problem is a bit similar to #23038 (comment) After we decided to use which design, I will add a db migration to fix the error history types. |
I don't against this solution. But we need to consider the migration. |
CI failure is related. |
Co-authored-by: delvh <[email protected]>
Since there is a migration in this PR, it will not easy to backport the migration. But other code could be backport. |
#22235 added new column
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the unknown column
error still happen?
If no, please add the wait-merge
label
|
I was unable to create a backport for 1.19, please send one manually. 🍵 |
There is a DB migration, IMO it's impossible to be backported. |
#23538) The project type will be changed in #23353, so the old fix #23325 will not work as well. And I also found that there were some problems in the old fix.... --------- Co-authored-by: Lauris BH <[email protected]>
* giteaofficial/main: (23 commits) Display the version of runner in the runner list (go-gitea#23490) Add `.patch` to `attachment.ALLOWED_TYPES` (go-gitea#23580) Sort Python package descriptors by version to mimic PyPI format (go-gitea#23550) Use `project.IconName` instead of repeated unreadable `if-else` chains (go-gitea#23538) Match api migration behavior to web behavior (go-gitea#23552) Fix dropdown icon misalignment when using fomantic icon (go-gitea#23558) Enable color for consistency checks diffs (go-gitea#23563) [skip ci] Updated translations via Crowdin Fix sticky header in diff view (go-gitea#23554) Fix some broken css (go-gitea#23560) Fix JS error on compare page (go-gitea#23551) Upgrade to npm lockfile v3 and explicitely set it (go-gitea#23561) Fix long name ui issues and label ui issue (go-gitea#23541) Remove worker-loader (go-gitea#23548) [skip ci] Updated translations via Crowdin Return `repository` in npm package metadata endpoint (go-gitea#23539) Fix diff detail buttons wrapping, use tippy for review box (go-gitea#23271) Do not store user projects as organization projects (go-gitea#23353) Imrove scroll behavior to hash issuecomment(scroll position, auto expand if file is folded, and on refreshing) (go-gitea#23513) Increase horizontal page padding (go-gitea#23507) ...
A part of #22865
At first, I think we do not need 3 ProjectTypes, as we can check user type, but it seems that it is not database friendly.