0
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-19 20:22:36 -05:00
Commit graph

3 commits

Author SHA1 Message Date
Earl Warren
376a2e19ea fix: reduce noise for the v303 migration (#6591)
Using SELECT `%s` FROM `%s` WHERE 0 = 1 to assert the existence of a column is simple but noisy: it shows errors in the migrations that are confusing for Forgejo admins because they are not actual errors.

Use introspection instead, which is more complicated but leads to the same result.

Add a test that ensures it works as expected, for all database types. Although the migration is run for all database types, it does not account for various scenarios and is never tested in the case a column does not exist.

Refs: https://codeberg.org/forgejo/forgejo/issues/6583

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6591
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-01-17 07:42:20 +00:00
Earl Warren
3003812477 fix: avoid Gitea migration warnings (take 2) (#6577)
274bc480b4 introduced a regression in https://codeberg.org/forgejo/forgejo/pulls/6343

Trying to remove fields that have already been removed by

dd1523c72e/models/forgejo_migrations/v14.go

Is a noop for SQLite and went undetected by the upgrade tests.

Fixes: https://codeberg.org/forgejo/forgejo/issues/6575
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6577
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-01-15 22:06:38 +00:00
Earl Warren
274bc480b4
fix: Gitea last drop
Some database fields were added in the database to facilitate
migration from Gitea and do not serve any purpose. Drop them since
v1.22 is the last version of the database to allow a transparent
migration to Forgejo.
2024-12-24 09:42:47 +01:00