[PR #5577] [CLOSED] Remove the column num_repos from the user table #17854

Closed
opened 2025-11-02 16:16:27 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/5577
Author: @typeless
Created: 12/22/2018
Status: Closed

Base: masterHead: eliminate-num-repos


📝 Commits (10+)

  • 2b2b5ec Remove the column num_repos from the user table
  • f0ee412 Update test fixtures
  • 4a61c64 Fix missing updates for templates
  • 346752d Remove unneeded argument for repo count
  • b37a46d Do not limit page size when when non-positive integers are specified
  • 7603375 Update
  • 0c38fdc UserView
  • ea8c026 Remove User.Orgs
  • f51e819 Use 'var foo []Foo' instead of make([]Foo)
  • f5a1317 Rename GetOrgUsers to GetUserOrgs

📊 Changes

14 files changed (+156 additions, -102 deletions)

View changed files

📝 models/action.go (+1 -1)
📝 models/consistency.go (+0 -1)
📝 models/fixtures/user.yml (+0 -25)
📝 models/org.go (+6 -2)
📝 models/repo.go (+5 -23)
📝 models/user.go (+120 -34)
📝 routers/api/v1/admin/org.go (+1 -1)
📝 routers/api/v1/admin/user.go (+1 -1)
📝 routers/api/v1/org/org.go (+6 -5)
📝 routers/api/v1/user/repo.go (+2 -2)
📝 routers/api/v1/user/user.go (+1 -1)
📝 routers/home.go (+1 -1)
📝 routers/user/home.go (+11 -4)
📝 templates/user/dashboard/dashboard.tmpl (+1 -1)

📄 Description

Before this change, we have to sync the count of repositories in a
background thread between the actual row numbers in the repository table
and the column of the user table to mitigate the introduced inconsistency.

If we could address all those alike redundancies in the future,
it would make creating test fixture less error-prone too.


🔄 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/5577 **Author:** [@typeless](https://github.com/typeless) **Created:** 12/22/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `eliminate-num-repos` --- ### 📝 Commits (10+) - [`2b2b5ec`](https://github.com/go-gitea/gitea/commit/2b2b5ec2cb88b236166354177cb0c66abe6a7a28) Remove the column num_repos from the user table - [`f0ee412`](https://github.com/go-gitea/gitea/commit/f0ee412b25752c4d3a7381ba8bd83f24a5612cca) Update test fixtures - [`4a61c64`](https://github.com/go-gitea/gitea/commit/4a61c64e9b19246d769198ee1af935f700199d16) Fix missing updates for templates - [`346752d`](https://github.com/go-gitea/gitea/commit/346752d11cc7fcda11ef4f93f5c175cc98257664) Remove unneeded argument for repo count - [`b37a46d`](https://github.com/go-gitea/gitea/commit/b37a46dd618b9088bb332e058a3c4fca4897b6da) Do not limit page size when when non-positive integers are specified - [`7603375`](https://github.com/go-gitea/gitea/commit/760337547794eec0c796f784a08d69644d2d66e4) Update - [`0c38fdc`](https://github.com/go-gitea/gitea/commit/0c38fdcd5deee667c5e992f0c08451f32b2f48b6) UserView - [`ea8c026`](https://github.com/go-gitea/gitea/commit/ea8c026db3ce4e87b4f3a0b2c881e9d8fb139e7d) Remove User.Orgs - [`f51e819`](https://github.com/go-gitea/gitea/commit/f51e8190fb785b30fd4682261866b4102ab64813) Use 'var foo []Foo' instead of make([]Foo) - [`f5a1317`](https://github.com/go-gitea/gitea/commit/f5a1317489e3bd3590918d94dd6c453b2debbe17) Rename GetOrgUsers to GetUserOrgs ### 📊 Changes **14 files changed** (+156 additions, -102 deletions) <details> <summary>View changed files</summary> 📝 `models/action.go` (+1 -1) 📝 `models/consistency.go` (+0 -1) 📝 `models/fixtures/user.yml` (+0 -25) 📝 `models/org.go` (+6 -2) 📝 `models/repo.go` (+5 -23) 📝 `models/user.go` (+120 -34) 📝 `routers/api/v1/admin/org.go` (+1 -1) 📝 `routers/api/v1/admin/user.go` (+1 -1) 📝 `routers/api/v1/org/org.go` (+6 -5) 📝 `routers/api/v1/user/repo.go` (+2 -2) 📝 `routers/api/v1/user/user.go` (+1 -1) 📝 `routers/home.go` (+1 -1) 📝 `routers/user/home.go` (+11 -4) 📝 `templates/user/dashboard/dashboard.tmpl` (+1 -1) </details> ### 📄 Description Before this change, we have to sync the count of repositories in a background thread between the actual row numbers in the repository table and the column of the user table to mitigate the introduced inconsistency. If we could address all those alike redundancies in the future, it would make creating test fixture less error-prone too. --- <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 16:16:27 -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#17854