0
0
Fork 0
mirror of https://codeberg.org/forgejo/docs.git synced 2024-12-23 22:20:43 -05:00

docs: developer: workflow: requirement for Forgejo database migrations

While feature branches may have different requirements for the Forgejo
tables, they are constrained by the migration logic that requires they
happen in sequence and are listed in the same list. If each feature
branch changes the `forgejo_migrations/migrate.go` file independently,
it is bound to conflict with other feature branches trying to do the
same.

To avoid this situation it is proposed that once a migration
developped and tested in a freature branch is final, it is isolated in
a commit and moved to the `forgejo-development` branch. This can
happen during a rebase or with a pull request.

It is probably better that all migrations are ultimately squashed in a
single commit in the `forgejo-development` branch instead of an ever
growing list of commits. But this is up to the person in charge of the
migrations and since the directory is owned by forgejo, there is no
risk of conflict.
This commit is contained in:
Earl Warren 2023-08-09 13:44:43 +02:00 committed by Caesar Schinas
parent 2f75787cf8
commit ab0782c39c
No known key found for this signature in database
GPG key ID: AE9108461BEA5ACF

View file

@ -79,7 +79,11 @@ The purpose of each _Feature branch_ is documented below:
CI configuration, including the release process.
- [forgejo-development](https://codeberg.org/forgejo/forgejo/src/branch/forgejo-development) based on [forgejo-ci](https://codeberg.org/forgejo/forgejo/src/branch/forgejo-ci)
Forgejo development tools and documentation.
Forgejo development tools, tests etc. that do not fit in a feature branch or that are used by multiple feature branches. The commits titles should be prefixed with
a string that reflects their purpose such as `[DOCS]`, `[DB]`, `[TESTS]` etc.
The database migrations of all feature branches must be in the `forgejo-development` branch. This is a requirement to ensure they do not conflict with each other
and happen in sequence.
### Dependency