[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 commit 8ee32978c0
)
This commit is contained in:
parent
7426c1edb4
commit
c240b34f59
2 changed files with 143 additions and 1 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"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"
|
||||
|
@ -607,5 +608,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