Skip to content

Add Size column to attachment #3734

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

Merged
merged 7 commits into from
Mar 31, 2018
Merged

Conversation

jonasfranz
Copy link
Member

This PR adds a size column to attachments to decrease the amount of unnecessary disk usage.
The migration calculates the file size of each existing attachment.

Migrate attachments by calculating file sizes

Signed-off-by: Jonas Franz <[email protected]>
@codecov-io
Copy link

codecov-io commented Mar 28, 2018

Codecov Report

Merging #3734 into master will increase coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3734      +/-   ##
=========================================
+ Coverage    22.9%   22.9%   +<.01%     
=========================================
  Files         124     124              
  Lines       24755   24747       -8     
=========================================
  Hits         5669    5669              
+ Misses      18223   18215       -8     
  Partials      863     863
Impacted Files Coverage Δ
models/attachment.go 40.57% <0%> (+2.22%) ⬆️

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 d877bf7...5230a4b. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 28, 2018
@jonasfranz
Copy link
Member Author

I dont't know if I should break on error while calculating file sizes or only log them.

@lunny lunny added the type/enhancement An improvement of existing functionality label Mar 29, 2018
@lunny lunny added this to the 1.5.0 milestone Mar 29, 2018
@lafriks
Copy link
Member

lafriks commented Mar 29, 2018

I think it should just log it and continue

@jonasfranz
Copy link
Member Author

@lafriks done

@lunny
Copy link
Member

lunny commented Mar 30, 2018

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 30, 2018
@lafriks
Copy link
Member

lafriks commented Mar 30, 2018

LGTM

@lafriks lafriks 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 Mar 30, 2018
@appleboy appleboy merged commit 3e06490 into go-gitea:master Mar 31, 2018
@jonasfranz jonasfranz deleted the size-column branch March 31, 2018 11:01
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
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. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants