[PR #3269] [MERGED] Remove IsOwner, NumTeams from OrgUser #16851

Closed
opened 2025-11-02 12:20:34 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/3269
Author: @ethantkoenig
Created: 12/30/2017
Status: Merged
Merged: 1/8/2018
Merged by: @lafriks

Base: masterHead: remove/org_user_cols


📝 Commits (1)

  • 7c7652d Remove IsOwner, NumTeams from OrgUser

📊 Changes

7 files changed (+63 additions, -77 deletions)

View changed files

📝 models/action_test.go (+1 -1)
📝 models/fixtures/org_user.yml (+0 -14)
📝 models/migrations/migrations.go (+2 -0)
models/migrations/v56.go (+33 -0)
📝 models/org.go (+23 -15)
📝 models/org_team.go (+0 -35)
📝 models/org_test.go (+4 -12)

📄 Description

Remove the IsOwner and NumTeams from the OrgUser structs (and remove the corresponding columns from the org_user table).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/3269 **Author:** [@ethantkoenig](https://github.com/ethantkoenig) **Created:** 12/30/2017 **Status:** ✅ Merged **Merged:** 1/8/2018 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `remove/org_user_cols` --- ### 📝 Commits (1) - [`7c7652d`](https://github.com/go-gitea/gitea/commit/7c7652d6b2f0558f2de8f28d3e8efb314e762a21) Remove IsOwner, NumTeams from OrgUser ### 📊 Changes **7 files changed** (+63 additions, -77 deletions) <details> <summary>View changed files</summary> 📝 `models/action_test.go` (+1 -1) 📝 `models/fixtures/org_user.yml` (+0 -14) 📝 `models/migrations/migrations.go` (+2 -0) ➕ `models/migrations/v56.go` (+33 -0) 📝 `models/org.go` (+23 -15) 📝 `models/org_team.go` (+0 -35) 📝 `models/org_test.go` (+4 -12) </details> ### 📄 Description Remove the `IsOwner` and `NumTeams` from the `OrgUser` structs (and remove the corresponding columns from the `org_user` table). - The `IsOwner` is outdated, since all org members must belong to at least one team (see https://github.com/go-gitea/gitea/pull/3164#issuecomment-350946035) - The `NumTeams` field is never used, and is not properly updated when a team is deleted. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:20:34 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16851