mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-24 19:12:24 +00:00
[DB] Forgejo database migrations
- Implements https://codeberg.org/forgejo/discussions/issues/32#issuecomment-918737 - Allows to add Forgejo-specific migrations that don't interfere with Gitea's migration logic. Please do note that we cannot liberally add migrations for Gitea tables, as they might do their own migrations in a future version on that table, and that could undo our migrations. Luckily, we don't have a scenario where that's needed and thus not taken into account. Co-authored-by: Gusted <postmaster@gusted.xyz> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/795 (cherry picked from commit8ee32978c0) (cherry picked from commitc240b34f59) (cherry picked from commit03936c6492) (cherry picked from commita20ed852f8) (cherry picked from commit1dfa82676f) (cherry picked from commitc39ae0bf8a) (cherry picked from commitcfaff08996) (cherry picked from commit94a458835a) (cherry picked from commit61a3cf77df) (cherry picked from commitabb350fde8) (cherry picked from commit5194829d6b) (cherry picked from commit89239a60f2) (cherry picked from commit683cfd86ef) (cherry picked from commitf4546cfed9) (cherry picked from commit86614d5826) (cherry picked from commite4b9c32187) (cherry picked from commit8c253719af) (cherry picked from commit857365d6c1) (cherry picked from commita488b3952f) (cherry picked from commit98313c4910) (cherry picked from commit72e47c3137) (cherry picked from commit22c304d964) (cherry picked from commitecf009b6f1) (cherry picked from commit2228b36389)
This commit is contained in:
parent
b156f57860
commit
ddd702fc93
2 changed files with 143 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"code.gitea.io/gitea/models/forgejo_migrations"
|
||||
"code.gitea.io/gitea/models/migrations/v1_10"
|
||||
"code.gitea.io/gitea/models/migrations/v1_11"
|
||||
"code.gitea.io/gitea/models/migrations/v1_12"
|
||||
|
|
@ -649,5 +650,7 @@ Please try upgrading to a lower version first (suggested v1.6.4), then upgrade t
|
|||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
// Execute Forgejo specific migrations.
|
||||
return forgejo_migrations.Migrate(x)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue