0
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-01-31 18:05:00 -05:00
forgejo/models
forgejo-backport-action 2d1e163913 [v10.0/forgejo] fix: reduce noise for the v303 migration (#6594)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/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

Co-authored-by: Earl Warren <contact@earl-warren.org>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6594
Reviewed-by: Earl Warren <earl-warren@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>
2025-01-17 08:15:16 +00:00
..
actions Improve Actions status aggregations (#32860) 2024-12-22 08:46:38 +01:00
activities Fix nil panic if repo doesn't exist (#32501) 2024-11-17 12:18:56 +01:00
admin Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
asymkey Merge pull request '[gitea] week 2024-34 cherry pick (gitea/main -> forgejo)' (#4998) from earl-warren/wcp/2024-34 into forgejo 2024-08-20 06:32:09 +00:00
auth fix: xorm needs to be lowercase otherwise it is ignored 2024-12-29 18:27:08 +00:00
avatars chore(build): use a stable mirror for go-libravatar 2024-09-14 09:58:49 +02:00
db chore: use errors.New to replace fmt.Errorf with no parameters (#32800) 2024-12-15 09:15:57 +01:00
dbfs Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
fixtures Support org labels when adding labels by label names (#32988) 2024-12-30 08:26:54 +00:00
forgefed enhance test & fix reviews 2024-05-14 08:24:31 +02:00
forgejo/semver tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
forgejo_migrations fix: keying SQLite migration 2024-12-24 10:05:59 +01:00
git Detect whether action view branch was deleted (#32764) 2024-12-15 09:45:10 +01:00
issues [v10.0/forgejo] feat: Add summary card for repos and releases 2025-01-01 22:00:26 +01:00
migrations [v10.0/forgejo] fix: reduce noise for the v303 migration (#6594) 2025-01-17 08:15:16 +00:00
organization fix: correct permission loading for limited organisation 2024-12-04 11:03:33 +01:00
packages tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
perm tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
project Trim title before insert/update to database to match the size requirements of database (#32498) 2024-11-17 12:18:56 +01:00
pull Add branch auto deletion for scheduled PRs 2024-10-31 03:49:15 +01:00
quota feat: Trivial default quota configuration 2024-08-26 13:25:34 +02:00
repo [v10.0/forgejo] feat: Add summary card for repos and releases 2025-01-01 22:00:26 +01:00
secret feat(secret): generate FORGEJO_TOKEN for all tasks 2024-12-08 09:42:18 +08:00
shared/types Refactor locale&string&template related code (#29165) 2024-02-16 15:20:52 +01:00
system fix: xorm:version default is inconsistent 2024-12-24 09:42:47 +01:00
unit i18n: UX improvements: Team permissions and issue closing 2024-09-24 19:03:30 +02:00
unittest chore: simplify CopyDir 2024-11-10 17:21:57 +01:00
user chore: Update user1 createdunix 2024-12-16 23:27:37 +03:00
webhook Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
error.go Add merge style fast-forward-only (#28954) 2024-02-14 17:19:19 +01:00
main_test.go tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
org.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
org_team.go Remove GetByBean method because sometimes it's danger when query condition parameter is zero and also introduce new generic methods (#28220) 2023-12-07 15:27:36 +08:00
org_team_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
org_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
repo.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
repo_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
repo_transfer.go chore: use errors.New to replace fmt.Errorf with no parameters will much better (#30621) 2024-04-28 15:39:00 +02:00
repo_transfer_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00