From ab0782c39cd953811912f28bf04bac53319536e2 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Wed, 9 Aug 2023 13:44:43 +0200 Subject: [PATCH] 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. --- developer/WORKFLOW.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/developer/WORKFLOW.md b/developer/WORKFLOW.md index fd440f4e..72cd8459 100644 --- a/developer/WORKFLOW.md +++ b/developer/WORKFLOW.md @@ -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