mirror of
https://codeberg.org/forgejo/forgejo
synced 2025-10-18 23:00:43 +02:00
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/8609 - Some SQL queries were not being run in the transaction of v32, which could lead to the migration failing or hanging indefinitely. - Use `db.WithTx` to get a `context.Context` that will make sure to run SQL queries in the transaction. - Using `db.DefaultContext` is fine to be used as parent context for starting the transaction, in all cases of starting the migration `x` and `db.DefaultContext` will point to the same engine. - Resolves forgejo/forgejo#8580 ## Testing 1. Have a v11 Forgejo database with a maven package. 2. Run this migration. Co-authored-by: Gusted <postmaster@gusted.xyz> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8613 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org> Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org> |
||
---|---|---|
.. | ||
v1_20 | ||
v1_22 | ||
main_test.go | ||
migrate.go | ||
migrate_test.go | ||
v13.go | ||
v14.go | ||
v15.go | ||
v16.go | ||
v17.go | ||
v18.go | ||
v19.go | ||
v20.go | ||
v21.go | ||
v22.go | ||
v23.go | ||
v24.go | ||
v25.go | ||
v25_test.go | ||
v26.go | ||
v27.go | ||
v28.go | ||
v29.go | ||
v30.go | ||
v30_test.go | ||
v31.go | ||
v31_test.go | ||
v32.go | ||
v32_test.go | ||
v33.go | ||
v33_test.go | ||
v34.go | ||
v35.go | ||
v36.go |