mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-22 10:04:09 -05:00
376a2e19ea
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> |
||
---|---|---|
.. | ||
actions | ||
activities | ||
admin | ||
asymkey | ||
auth | ||
avatars | ||
db | ||
dbfs | ||
fixtures | ||
forgefed | ||
forgejo/semver | ||
forgejo_migrations | ||
git | ||
issues | ||
migrations | ||
organization | ||
packages | ||
perm | ||
project | ||
pull | ||
quota | ||
repo | ||
secret | ||
shared/types | ||
system | ||
unit | ||
unittest | ||
user | ||
webhook | ||
error.go | ||
main_test.go | ||
org.go | ||
org_team.go | ||
org_team_test.go | ||
org_test.go | ||
repo.go | ||
repo_test.go | ||
repo_transfer.go | ||
repo_transfer_test.go |