You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add ignore_columns to exclude columns from reconciliation
Columns listed in ignore_columns are included in the initial INSERT
but excluded from change detection, UPDATE statements, and content
hash computation. Useful for timestamps, tokens, or values managed
by database triggers.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
### Added
11
11
- Auto-tag workflow: CI automatically creates a git tag when `Cargo.toml` version changes on main, triggering the release workflow.
12
12
-`/release` skill for Claude Code: guided release preparation with version determination, confirmation, and PR creation.
13
+
-`ignore_columns` option for reconcile mode tables: columns listed in `ignore_columns` are included in the initial INSERT but excluded from change detection, UPDATE statements, and content hash computation. Useful for timestamps, tokens, or values managed by database triggers.
13
14
14
15
### Fixed
15
16
- Replaced Dockerfile `--mount=type=cache` with dependency layer caching ("empty main" trick) for reliable Docker build caching in GitHub Actions, where `--mount=type=cache` does not persist across runners.
Copy file name to clipboardExpand all lines: docs/seeding.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -250,6 +250,28 @@ initium seed --spec /seeds/seed.yaml --reconcile-all
250
250
- **Changed rows** (different values for same unique key) are updated.
251
251
- **Removed rows** (in DB but not in spec) are deleted.
252
252
253
+
**Ignoring columns:** Some columns should be set on initial insert but never overwritten during reconciliation (e.g., timestamps, random tokens, or values managed by database triggers). Use `ignore_columns` to exclude them:
254
+
255
+
```yaml
256
+
tables:
257
+
- table: users
258
+
unique_key: [email]
259
+
ignore_columns: [created_at, api_token]
260
+
rows:
261
+
- email: alice@example.com
262
+
name: Alice
263
+
created_at: "2026-01-01"
264
+
api_token: "$env:ALICE_TOKEN"
265
+
```
266
+
267
+
Ignored columns are:
268
+
- **Included** in the initial INSERT (the row is written with all columns).
269
+
- **Excluded** from change detection (changing an ignored column's value in the spec does not trigger an update).
270
+
- **Excluded** from UPDATE statements (manual or trigger-managed changes in the database are preserved).
271
+
- **Excluded** from the content hash (so they don't affect the fast-path skip).
272
+
273
+
`ignore_columns`cannot overlap with `unique_key`.
274
+
253
275
**Requirements:**
254
276
- Every table in a reconciled seed set must have a `unique_key`. Without it, there is no way to identify which rows correspond to which spec entries.
255
277
- Environment variable changes trigger reconciliation (resolved values are compared, not raw templates).
0 commit comments