Prohibit automatic downgrades#13108
Conversation
|
@lafriks added print to stderr too while testing the backport ... I noticed it wont show up in the terminal - hope It's still fine |
|
backport #13111 |
|
Or we can add a flag or an environment to force downgrade, but not update the database manually. |
|
@lunny did had a quick look, a flag would be a nice optional enhancement, but we have to refactor some code then, so migration functions can have options then ... gitea/models/migrations/migrations.go Lines 290 to 291 in 0e4f663 |
Codecov Report
@@ Coverage Diff @@
## master #13108 +/- ##
==========================================
- Coverage 42.51% 42.45% -0.07%
==========================================
Files 673 673
Lines 74116 74118 +2
==========================================
- Hits 31512 31466 -46
- Misses 37484 37551 +67
+ Partials 5120 5101 -19
Continue to review full report at Codecov.
|
Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
|
🚀 |
* Prohibit automatic downgrades * do not only log, print to stderr too * Update models/migrations/migrations.go * Update models/migrations/migrations.go Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> * a nit Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com>
close #13107