Commit f4cb375
committed
docs(clickhouse): require max+1 numbering and idempotent DDL for migrations
Codify two rules that came out of the 029/030 ordering incident (TRI-9367
test cloud deploy):
1. ClickHouse migration files must be numbered max(existing)+1. Goose runs
in strict mode in the deploy pipeline and refuses to apply a missing
version below the current version, which blocks the deploy. Branches
that fell behind main need to renumber before merging.
2. DDL must be idempotent (ADD COLUMN IF NOT EXISTS, DROP COLUMN IF EXISTS,
CREATE TABLE IF NOT EXISTS, etc.) so a retry or out-of-order apply
(e.g. goose up --allow-missing for local recovery) is a no-op rather
than an error.
Rules go in internal-packages/clickhouse/CLAUDE.md; reviewer-facing
summary added to .claude/REVIEW.md as a new 🔴 finding.1 parent eedde27 commit f4cb375
2 files changed
Lines changed: 32 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
8 | 27 | | |
9 | 28 | | |
10 | 29 | | |
11 | 30 | | |
12 | | - | |
| 31 | + | |
13 | 32 | | |
14 | 33 | | |
15 | 34 | | |
16 | | - | |
| 35 | + | |
17 | 36 | | |
18 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
19 | 47 | | |
20 | 48 | | |
21 | 49 | | |
| |||
0 commit comments