mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-11 22:50:06 +00:00
ci: Fold DB schema docs check into the DB Tests job (no-changelog) (#32200)
This commit is contained in:
@@ -123,7 +123,7 @@ Run through this before requesting review. Each item is a real, recurring review
|
||||
- [ ] **One logical change per migration**; split unrelated table changes into separate files. — [Don't combine independent schema changes](#dont-combine-independent-schema-changes)
|
||||
- [ ] **`up()` / `down()` reads as a list of intentions.** If either body grows past a screen or mixes schema operations with a multi-statement raw-SQL data move, extract the data move into a `private async` method on the same class (e.g. `private async backfillFromX(ctx)`). The top-level should orchestrate, not implement.
|
||||
- [ ] **Precedent is the bar to fix, not perpetuate.** When the checklist conflicts with what an older migration does (e.g. redundant `.primary.notNull`, hand-quoted identifiers, missing `.comment()`), the checklist wins for new code — don't copy the violation forward. Note the old occurrences in the PR if you spotted them.
|
||||
- [ ] **Regenerated the schema docs** with `pnpm db:schema:docs` and committed the `docs/generated/` changes. The `schema-docs-check` CI job fails on stale docs. — [Schema documentation](#schema-documentation)
|
||||
- [ ] **Regenerated the schema docs** with `pnpm db:schema:docs` and committed the `docs/generated/` changes. The DB Tests CI job fails on stale docs. — [Schema documentation](#schema-documentation)
|
||||
|
||||
Treat the checklist as a floor, not a ceiling.
|
||||
If any item fails, fix it before opening review.
|
||||
@@ -791,7 +791,7 @@ Regenerate and commit them alongside your migration:
|
||||
|
||||
```sh
|
||||
pnpm db:schema:docs # rewrites docs/generated/ — requires Docker (and `brew install tbls` locally)
|
||||
pnpm db:schema:check # verify only; what the schema-docs-check CI job runs
|
||||
pnpm db:schema:check # verify only; what the DB Tests CI job runs
|
||||
```
|
||||
|
||||
The `schema-docs-check` CI job fails the PR when the committed docs don't match the migrations. Don't hand-edit anything under `docs/generated/` — it's overwritten on every regeneration.
|
||||
The DB Tests CI job fails the PR when the committed docs don't match the migrations (each matrix leg verifies its own database). Don't hand-edit anything under `docs/generated/` — it's overwritten on every regeneration.
|
||||
|
||||
Reference in New Issue
Block a user