0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-22 13:57:46 -05:00
forgejo/models
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
..
actions Add search action jobs for API routes, repo, org and global level (#6300) 2025-01-14 11:17:42 +00:00
activities
admin
asymkey
auth fix: xorm needs to be lowercase otherwise it is ignored 2024-12-29 16:25:51 +00:00
avatars
db feat: add limited execution tracing support 2025-01-05 04:07:49 +01:00
dbfs
fixtures Add search action jobs for API routes, repo, org and global level (#6300) 2025-01-14 11:17:42 +00:00
forgefed
forgejo/semver
forgejo_migrations fix: keying SQLite migration 2024-12-24 10:05:59 +01:00
git
issues chore(performance): loadCommentsByType sets Issues 2025-01-12 17:52:38 +01:00
migrations fix: reduce noise for the v303 migration (#6591) 2025-01-17 07:42:20 +00:00
organization
packages
perm
project Use project's redirect url instead of composing url (#33058) 2025-01-05 13:46:19 +00:00
pull
quota
repo Update 2024-12-30 17:47:34 +01:00
secret
shared/types
system fix: xorm:version default is inconsistent 2024-12-24 09:42:47 +01:00
unit
unittest Refactor env var related code (#33075) 2025-01-05 13:46:19 +00:00
user chore: Update user1 createdunix 2024-12-16 23:27:37 +03:00
webhook
error.go
main_test.go
org.go
org_team.go
org_team_test.go
org_test.go
repo.go Fix issue comment number (#30556) 2025-01-05 12:21:39 +00:00
repo_test.go Fix issue comment number (#30556) 2025-01-05 12:21:39 +00:00
repo_transfer.go
repo_transfer_test.go