Gitea: Deprecate very old migrations

Created on 23 Jan 2020  路  4Comments  路  Source: go-gitea/gitea

Gitea version: 1.12

I've seen many issues with users being unable to upgrade directly from their very old version into 1.9, 1.10, etc. Our usual response (which solves their problem) is to attempt migrating in smaller steps (e.g. 1.4.x -> 1.5.3, 1.5.x -> 1.6.4, etc.).

Since upgrading from such old versions seems broken, what if (just this time, not as a regular thing) we stop supporting migrating versions prior to (say) 1.6.0, and force users to use older giteas to do the intermediate steps? There's already code for that, but the bar is set at 0.6.0.

https://github.com/go-gitea/gitea/blob/bfdfa9a8b32ae331f98137169693ba1d71c25b09/models/migrations/migrations.go#L30

https://github.com/go-gitea/gitea/blob/bfdfa9a8b32ae331f98137169693ba1d71c25b09/models/migrations/migrations.go#L71-L87

https://github.com/go-gitea/gitea/blob/bfdfa9a8b32ae331f98137169693ba1d71c25b09/models/migrations/migrations.go#L330-L335

kinenhancement

Most helpful comment

What would you think should be the earliest version we should still support migrating from in 1.12?

  • 馃憥 Earlier than 1.5.3
  • 馃槙 1.5.3
  • 馃憖 1.6.x
  • 馃憤 1.6.4
  • 馃槃 1.7.x
  • 馃殌 1.7.6
  • 鉂わ笍 1.8.3

All 4 comments

secound solution would be finding the bugs and fixing them ... but your idear is easyer for us devs ...

We could probably support migrations for last five or six major versions

What would you think should be the earliest version we should still support migrating from in 1.12?

  • 馃憥 Earlier than 1.5.3
  • 馃槙 1.5.3
  • 馃憖 1.6.x
  • 馃憤 1.6.4
  • 馃槃 1.7.x
  • 馃殌 1.7.6
  • 鉂わ笍 1.8.3

There are no migration changes between 1.7.0 and 1.7.6, only one minor between 1.6.0 and 1.6.4. I think it makes sense to support from any minor version of the major version supported, as new database changes should normally be avoided in minor versions.

Was this page helpful?
0 / 5 - 0 ratings