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

Fix dump command #6385

Closed
wants to merge 1 commit into from
Closed

Fix dump command #6385

wants to merge 1 commit into from

Conversation

kerie
Copy link

@kerie kerie commented Mar 20, 2019

Fix #6310

The TableName() method defined on pointer receivers is not invoked by Xorm. Change method receivers to non-pointer receivers.

@kerie kerie changed the title Fix dump comand Fix dump command Mar 20, 2019
Signed-off-by: Kerie <[email protected]>
@codecov-io
Copy link

codecov-io commented Mar 20, 2019

Codecov Report

Merging #6385 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6385      +/-   ##
==========================================
- Coverage   38.85%   38.84%   -0.02%     
==========================================
  Files         365      365              
  Lines       51360    51360              
==========================================
- Hits        19957    19951       -6     
- Misses      28530    28537       +7     
+ Partials     2873     2872       -1
Impacted Files Coverage Δ
models/oauth2_application.go 54.83% <100%> (ø) ⬆️
models/unit.go 0% <0%> (-14.29%) ⬇️
routers/repo/view.go 41.08% <0%> (-1%) ⬇️

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 b78cbbc...7763409. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 20, 2019
@GiteaBot GiteaBot 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 20, 2019
@GiteaBot GiteaBot 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 20, 2019
sapk
sapk approved these changes Mar 20, 2019
Copy link
Member

@sapk sapk left a comment

Choose a reason for hiding this comment

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

Sorry for the too quick L-GTM.
Strangely, the xorm docs say If struct or pointer of struct has TableName() string method, the return value will be the struct’s table name.

What are the impact on the gitea database? Does the web command use the good tablename ? Or does this PR will also change it ? In this case it will need a migration. If not we should find why the dump command don't use it like the web command.

@lunny
Copy link
Member

lunny commented Mar 20, 2019

I think @sapk is right. This PR will not work. I will send another PR to fix that.

Copy link
Member

@lunny lunny left a comment

Choose a reason for hiding this comment

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

Won't work

@kerie
Copy link
Author

kerie commented Mar 20, 2019

Thank you for your quick response. The new PR is awesome, and I will close this one.

@kerie kerie closed this Mar 20, 2019
@kerie kerie deleted the fix-dump branch March 20, 2019 14:26
@lunny
Copy link
Member

lunny commented Mar 20, 2019

@kerie Anyway, thank you for your help!

@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to dump database: pq: relation "o_auth2_application" does not exist
5 participants