-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
This is a necessary step to help fix #3265 |
@zeripath maybe you can send this PR to xorm and add some unit tests there. |
This PR really needs a unit test. |
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.