1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-01-21 16:55:06 -05:00
forgejo/models/migrations
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
..
base [CHORE] Move test related function to own package 2024-07-14 17:00:49 +02:00
fixtures feat: migrate TOTP secrets to keying 2024-11-27 00:34:16 +01:00
test Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
v1_6 Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
v1_7 Rename Sync2 -> Sync (#26479) 2023-08-13 21:17:21 +02:00
v1_8 [CHORE] Remove Microsoft SQL Server Support 2024-04-05 23:37:36 +02:00
v1_9 Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
v1_10 Rename Sync2 -> Sync (#26479) 2023-08-13 21:17:21 +02:00
v1_11 Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
v1_12 [CHORE] Remove Microsoft SQL Server Support 2024-04-05 23:37:36 +02:00
v1_13 [CHORE] Remove Microsoft SQL Server Support 2024-04-05 23:37:36 +02:00
v1_14 Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
v1_15 Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
v1_16 Fix linting issues 2024-08-18 16:25:13 +02:00
v1_17 Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
v1_18 Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
v1_19 Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
v1_20 Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
v1_21 Upgrade xorm to v1.3.9 and improve some migrations Sync (#29899) 2024-07-22 15:44:13 +02:00
v1_22 Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
v1_23 fix: reduce noise for the v303 migration (#6591) 2025-01-17 07:42:20 +00:00
migrations.go fix: keying SQLite migration 2024-12-24 10:05:59 +01:00
migrations_test.go [PORT] Refactor the DB migration system slightly (gitea#32344) 2024-11-03 17:00:48 +01:00