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

Make dropTableColumns drop columns on sqlite and constraints on all #6849

Merged
merged 6 commits into from Jul 1, 2019

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented May 4, 2019

In #6823 it was suggested that I use migrations.dropTableColumns to fix v78.go. Unfortunately, this is not completely usable as it doesn't drop constraints by default (except on MSSQL).

Further on SQLite it doesn't drop columns.

This PR adjusts the code to allow recreation of the SQLite table to drop columns and adds removal of index constraints for all databases.

I believe that this should work for all variants but I would appreciate reviews.

@codecov-io
Copy link

codecov-io commented May 4, 2019

Codecov Report

Merging #6849 into master will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6849      +/-   ##
==========================================
- Coverage    41.3%   41.26%   -0.04%     
==========================================
  Files         466      466              
  Lines       63186    63254      +68     
==========================================
+ Hits        26099    26102       +3     
- Misses      33676    33742      +66     
+ Partials     3411     3410       -1
Impacted Files Coverage Δ
models/migrations/migrations.go 1.32% <0%> (-0.2%) ⬇️
modules/process/manager.go 81.15% <0%> (+4.34%) ⬆️

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 5f25558...1774e78. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 4, 2019
@lafriks lafriks added this to the 1.9.0 milestone May 5, 2019
@zeripath
Copy link
Contributor Author

This is a necessary step to help fix #3265

@lunny
Copy link
Member

lunny commented May 18, 2019

@zeripath maybe you can send this PR to xorm and add some unit tests there.

@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 May 30, 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 Jul 1, 2019
@lunny
Copy link
Member

lunny commented Aug 1, 2019

This PR really needs a unit test.

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

Successfully merging this pull request may close these issues.

None yet

8 participants