The Wayback Machine - https://web.archive.org/web/20230112204014/https://github.com/go-gitea/gitea/pull/17075
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

Move db related basic functions to models/db #17075

Merged
merged 12 commits into from Sep 19, 2021
Merged

Conversation

lunny
Copy link
Member

@lunny lunny commented Sep 17, 2021

Since models becomes more and more big, splitting it becomes a task to refactor.

This PR create a new subpackage models/db and move common database functions to that package.

The next PRs should create business logic related subpackages of models and move related codes there. i.e. Moving all models/issue*.go to models/issues/.

@lunny lunny added this to the 1.16.0 milestone Sep 17, 2021
@lunny lunny force-pushed the lunny/models branch 2 times, most recently from c870928 to 43f4e97 Compare Sep 18, 2021
modules/emoji/emoji_data.go Outdated Show resolved Hide resolved
models/list_options.go Outdated Show resolved Hide resolved
Copy link
Member

@KN4CK3R KN4CK3R left a comment

Choose a reason for hiding this comment

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

Otherwise lgtm

@codecov-commenter
Copy link

codecov-commenter commented Sep 18, 2021

Codecov Report

Merging #17075 (d541431) into main (6532aa2) will increase coverage by 0.01%.
The diff coverage is 68.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #17075      +/-   ##
==========================================
+ Coverage   45.24%   45.25%   +0.01%     
==========================================
  Files         771      773       +2     
  Lines       86767    86828      +61     
==========================================
+ Hits        39255    39292      +37     
- Misses      41160    41181      +21     
- Partials     6352     6355       +3     
Impacted Files Coverage Δ
cmd/cmd.go 44.18% <0.00%> (ø)
cmd/convert.go 0.00% <0.00%> (ø)
cmd/doctor.go 0.00% <0.00%> (ø)
cmd/dump.go 0.91% <0.00%> (ø)
cmd/migrate.go 0.00% <0.00%> (ø)
cmd/migrate_storage.go 0.00% <0.00%> (ø)
models/db/convert.go 0.00% <ø> (ø)
models/db/log.go 31.70% <ø> (ø)
models/db/sequence.go 0.00% <0.00%> (ø)
models/db/sql_postgres_with_schema.go 0.00% <ø> (ø)
... and 178 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 462306e...d541431. Read the comment docs.

@lunny lunny merged commit a4bfef2 into go-gitea:main Sep 19, 2021
2 checks passed
@lunny lunny deleted the lunny/models branch Sep 19, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

None yet

5 participants