Skip to content

Commit bd16fe3

Browse files
docs: align all markdown table columns across documentation files
Ensure all | characters in markdown tables are at consistent column offsets for improved source readability. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 64be8bf commit bd16fe3

7 files changed

Lines changed: 152 additions & 152 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6767

6868
### Fixed
6969
- Updated Dockerfiles (`Dockerfile`, `jyq.Dockerfile`) from `rust:1.85-alpine` to `rust:1.88-alpine` to fix release workflow failure caused by `time@0.3.47` requiring rustc 1.88.0
70-
- Aligned all markdown table columns across documentation files (`FAQ.md`, `README.md`, `docs/security.md`, `docs/seeding.md`, `docs/usage.md`)
70+
- Aligned all markdown table columns across documentation files (`FAQ.md`, `README.md`, `docs/seeding.md`, `docs/templating.md`, `docs/usage.md`, `tests/README.md`)
7171
- Fixed clippy `collapsible_if` lint in seed executor's unique key check
7272
- Removed dead code: unused `src/cmd/seed.rs` module (replaced by `src/seed/`)
7373
- Suppressed unused field warning on `AutoIdConfig.id_type` (reserved for future use)

FAQ.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ This is useful when you're shipping logs to a centralized system like Loki, Data
147147

148148
All retry parameters are flags on the `wait-for` subcommand:
149149

150-
| Flag | Default | What it does |
151-
| ------------------ | --------- | ------------------------------------------------------------------------ |
152-
| `--max-attempts` | `60` | Total number of attempts before giving up |
153-
| `--initial-delay` | `1s` | Delay after the first failure |
154-
| `--max-delay` | `30s` | Upper bound on delay between retries |
155-
| `--backoff-factor` | `2.0` | Multiplier applied to the delay after each attempt |
156-
| `--jitter` | `0.1` | Random fraction (0.0–1.0) added to each delay to prevent thundering herd |
157-
| `--timeout` | `5m` | Hard deadline across all targets |
150+
| Flag | Default | What it does |
151+
| ------------------ | ------- | ------------------------------------------------------------------------ |
152+
| `--max-attempts` | `60` | Total number of attempts before giving up |
153+
| `--initial-delay` | `1s` | Delay after the first failure |
154+
| `--max-delay` | `30s` | Upper bound on delay between retries |
155+
| `--backoff-factor` | `2.0` | Multiplier applied to the delay after each attempt |
156+
| `--jitter` | `0.1` | Random fraction (0.0–1.0) added to each delay to prevent thundering herd |
157+
| `--timeout` | `5m` | Hard deadline across all targets |
158158

159159
Example — fast retries with low jitter:
160160

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ cargo build --release --no-default-features --features postgres,sqlite
106106
cargo build --release --no-default-features --features sqlite
107107
```
108108

109-
| Feature | Default | Description |
110-
| ---------- | ------- | ------------------ |
111-
| `sqlite` || SQLite driver |
112-
| `postgres` || PostgreSQL driver |
109+
| Feature | Default | Description |
110+
| ---------- | ------- | -------------------- |
111+
| `sqlite` || SQLite driver |
112+
| `postgres` || PostgreSQL driver |
113113
| `mysql` || MySQL/MariaDB driver |
114114

115115
## Helm Chart
@@ -330,13 +330,13 @@ helm install my-app charts/initium \
330330

331331
Initium was built to address limitations in existing init container tools:
332332

333-
| Tool | Language | Image size | Multi-tool | Database seeding | Security posture |
334-
| --------------------------------------------------------------------------- | -------- | ----------- | ---------- | ---------------- | ----------------------- |
335-
| **Initium** | Rust | ~5 MB | Yes | Yes | PSA `restricted`, no OS |
336-
| [wait-for-it](https://github.com/vishnubob/wait-for-it) | Bash | Needs shell | No | No | Requires shell + netcat |
337-
| [dockerize](https://github.com/jwilder/dockerize) | Go | ~17 MB | Partial | No | Full OS image |
338-
| [k8s-wait-for](https://github.com/groundnuty/k8s-wait-for) | Bash | Needs shell | No | No | Requires shell + kubectl|
339-
| [wait4x](https://github.com/atkrad/wait4x) | Go | ~12 MB | No | No | Minimal OS |
333+
| Tool | Language | Image size | Multi-tool | Database seeding | Security posture |
334+
| ---------------------------------------------------------- | -------- | ----------- | ---------- | ---------------- | ------------------------ |
335+
| **Initium** | Rust | ~5 MB | Yes | Yes | PSA `restricted`, no OS |
336+
| [wait-for-it](https://github.com/vishnubob/wait-for-it) | Bash | Needs shell | No | No | Requires shell + netcat |
337+
| [dockerize](https://github.com/jwilder/dockerize) | Go | ~17 MB | Partial | No | Full OS image |
338+
| [k8s-wait-for](https://github.com/groundnuty/k8s-wait-for) | Bash | Needs shell | No | No | Requires shell + kubectl |
339+
| [wait4x](https://github.com/atkrad/wait4x) | Go | ~12 MB | No | No | Minimal OS |
340340

341341
If you only need TCP/HTTP readiness checks, any of these tools work. Initium is designed for teams that also need migrations, seeding, config rendering, and secret fetching in a single security-hardened binary.
342342

docs/seeding.md

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Seed spec files are MiniJinja templates: they are rendered with environment vari
66

77
## Supported Databases
88

9-
| Driver | Connection URL format |
10-
| ------------ | ------------------------------------------------ |
11-
| `postgres` | `postgres://user:pass@host:5432/dbname` |
12-
| `mysql` | `mysql://user:pass@host:3306/dbname` |
13-
| `sqlite` | `/path/to/database.db` or `:memory:` for tests |
9+
| Driver | Connection URL format |
10+
| ---------- | ---------------------------------------------- |
11+
| `postgres` | `postgres://user:pass@host:5432/dbname` |
12+
| `mysql` | `mysql://user:pass@host:3306/dbname` |
13+
| `sqlite` | `/path/to/database.db` or `:memory:` for tests |
1414

1515
## Quick Start
1616

@@ -65,47 +65,47 @@ phases:
6565
6666
### Field reference
6767
68-
| Field | Type | Required | Description |
69-
| -------------------------------------------------- | ---------- | ---------- | ---------------------------------------------------------------- |
70-
| `database.driver` | string | Yes | Database driver: `postgres`, `mysql`, or `sqlite` |
71-
| `database.url` | string | No | Direct database connection URL |
72-
| `database.url_env` | string | No | Environment variable containing the database URL |
73-
| `database.tracking_table` | string | No | Name of the seed tracking table (default: `initium_seed`) |
74-
| `phases[].name` | string | Yes | Unique phase name |
75-
| `phases[].order` | integer | No | Execution order (lower first, default: 0) |
76-
| `phases[].database` | string | No | Target database name (for create/switch) |
77-
| `phases[].schema` | string | No | Target schema name (for create/switch) |
78-
| `phases[].create_if_missing` | boolean | No | Create the database/schema if it does not exist (default: false) |
79-
| `phases[].timeout` | string | No | Default wait timeout (e.g. `30s`, `1m`, `1m30s`; default: `30s`) |
80-
| `phases[].wait_for[].type` | string | Yes | Object type: `table`, `view`, `schema`, or `database` |
81-
| `phases[].wait_for[].name` | string | Yes | Object name to wait for |
82-
| `phases[].wait_for[].timeout` | string | No | Per-object timeout override (e.g. `60s`, `2m`, `1m30s`) |
83-
| `phases[].seed_sets[].name` | string | Yes | Unique name for the seed set (used in tracking) |
84-
| `phases[].seed_sets[].order` | integer | No | Execution order (lower values first, default: 0) |
85-
| `phases[].seed_sets[].tables[].table` | string | Yes | Target database table name |
86-
| `phases[].seed_sets[].tables[].order` | integer | No | Execution order within the seed set (default: 0) |
87-
| `phases[].seed_sets[].tables[].unique_key` | string[] | No | Columns for duplicate detection |
88-
| `phases[].seed_sets[].tables[].auto_id.column` | string | No | Auto-generated ID column name |
89-
| `phases[].seed_sets[].tables[].auto_id.id_type` | string | No | ID type (default: `integer`) |
90-
| `phases[].seed_sets[].tables[].rows[]._ref` | string | No | Internal reference name for cross-table references |
68+
| Field | Type | Required | Description |
69+
| ----------------------------------------------- | -------- | -------- | ---------------------------------------------------------------- |
70+
| `database.driver` | string | Yes | Database driver: `postgres`, `mysql`, or `sqlite` |
71+
| `database.url` | string | No | Direct database connection URL |
72+
| `database.url_env` | string | No | Environment variable containing the database URL |
73+
| `database.tracking_table` | string | No | Name of the seed tracking table (default: `initium_seed`) |
74+
| `phases[].name` | string | Yes | Unique phase name |
75+
| `phases[].order` | integer | No | Execution order (lower first, default: 0) |
76+
| `phases[].database` | string | No | Target database name (for create/switch) |
77+
| `phases[].schema` | string | No | Target schema name (for create/switch) |
78+
| `phases[].create_if_missing` | boolean | No | Create the database/schema if it does not exist (default: false) |
79+
| `phases[].timeout` | string | No | Default wait timeout (e.g. `30s`, `1m`, `1m30s`; default: `30s`) |
80+
| `phases[].wait_for[].type` | string | Yes | Object type: `table`, `view`, `schema`, or `database` |
81+
| `phases[].wait_for[].name` | string | Yes | Object name to wait for |
82+
| `phases[].wait_for[].timeout` | string | No | Per-object timeout override (e.g. `60s`, `2m`, `1m30s`) |
83+
| `phases[].seed_sets[].name` | string | Yes | Unique name for the seed set (used in tracking) |
84+
| `phases[].seed_sets[].order` | integer | No | Execution order (lower values first, default: 0) |
85+
| `phases[].seed_sets[].tables[].table` | string | Yes | Target database table name |
86+
| `phases[].seed_sets[].tables[].order` | integer | No | Execution order within the seed set (default: 0) |
87+
| `phases[].seed_sets[].tables[].unique_key` | string[] | No | Columns for duplicate detection |
88+
| `phases[].seed_sets[].tables[].auto_id.column` | string | No | Auto-generated ID column name |
89+
| `phases[].seed_sets[].tables[].auto_id.id_type` | string | No | ID type (default: `integer`) |
90+
| `phases[].seed_sets[].tables[].rows[]._ref` | string | No | Internal reference name for cross-table references |
9191

9292
### Wait-for object support by driver
9393

94-
| Object type | SQLite | PostgreSQL | MySQL |
95-
| ------------- | -------- | ------------ | ------- |
96-
| `table` | ✅ | ✅ | ✅ |
97-
| `view` | ✅ | ✅ | ✅ |
98-
| `schema` | ❌ | ✅ | ✅* |
99-
| `database` | ❌ | ✅ | ✅* |
94+
| Object type | SQLite | PostgreSQL | MySQL |
95+
| ----------- | ------ | ---------- | ----- |
96+
| `table` | ✅ | ✅ | ✅ |
97+
| `view` | ✅ | ✅ | ✅ |
98+
| `schema` | ❌ | ✅ | ✅* |
99+
| `database` | ❌ | ✅ | ✅* |
100100

101101
\* In MySQL, `schema` and `database` are synonymous.
102102

103103
### Create-if-missing support by driver
104104

105-
| Operation | SQLite | PostgreSQL | MySQL |
106-
| ------------------- | -------- | ------------ | ------- |
107-
| `CREATE DATABASE` | ❌ | ✅ | ✅ |
108-
| `CREATE SCHEMA` | ❌ | ✅ | ✅* |
105+
| Operation | SQLite | PostgreSQL | MySQL |
106+
| ----------------- | ------ | ---------- | ----- |
107+
| `CREATE DATABASE` | ❌ | ✅ | ✅ |
108+
| `CREATE SCHEMA` | ❌ | ✅ | ✅* |
109109

110110
\* In MySQL, `CREATE SCHEMA` maps to `CREATE DATABASE`.
111111

@@ -276,30 +276,30 @@ spec:
276276

277277
## CLI Reference
278278

279-
| Flag | Default | Description |
280-
| ----------- | ------------ | --------------------------------------- |
281-
| `--spec` | (required) | Path to seed spec file (YAML or JSON) |
282-
| `--reset` | `false` | Delete existing data and re-apply seeds |
283-
| `--json` | `false` | Enable JSON log output |
279+
| Flag | Default | Description |
280+
| --------- | ---------- | --------------------------------------- |
281+
| `--spec` | (required) | Path to seed spec file (YAML or JSON) |
282+
| `--reset` | `false` | Delete existing data and re-apply seeds |
283+
| `--json` | `false` | Enable JSON log output |
284284

285285
## Failure Modes
286286

287-
| Scenario | Behavior |
288-
| --------------------------------------- | -------------------------------------------------------- |
289-
| Invalid spec file | Fails with parse error before connecting to database |
290-
| Invalid MiniJinja template | Fails with template syntax error before parsing YAML |
291-
| Database unreachable | Fails with connection error |
292-
| Unsupported driver | Fails with descriptive error listing supported drivers |
293-
| Missing env var for URL | Fails with error naming the missing variable |
294-
| Missing env var in `$env:` | Fails with error naming the missing variable |
295-
| Unresolved `@ref:` | Fails with error naming the missing reference |
296-
| Row insertion failure | Entire seed set rolled back via transaction |
297-
| Duplicate row (with unique_key) | Row silently skipped |
298-
| Already-applied seed set | Seed set silently skipped |
299-
| Wait-for object timeout | Fails with structured timeout error naming the object |
300-
| Unsupported object type for driver | Fails immediately with driver-specific error |
301-
| CREATE DATABASE on SQLite | Fails with "not supported" error |
302-
| CREATE SCHEMA on SQLite | Fails with "not supported" error |
287+
| Scenario | Behavior |
288+
| ---------------------------------- | ------------------------------------------------------ |
289+
| Invalid spec file | Fails with parse error before connecting to database |
290+
| Invalid MiniJinja template | Fails with template syntax error before parsing YAML |
291+
| Database unreachable | Fails with connection error |
292+
| Unsupported driver | Fails with descriptive error listing supported drivers |
293+
| Missing env var for URL | Fails with error naming the missing variable |
294+
| Missing env var in `$env:` | Fails with error naming the missing variable |
295+
| Unresolved `@ref:` | Fails with error naming the missing reference |
296+
| Row insertion failure | Entire seed set rolled back via transaction |
297+
| Duplicate row (with unique_key) | Row silently skipped |
298+
| Already-applied seed set | Seed set silently skipped |
299+
| Wait-for object timeout | Fails with structured timeout error naming the object |
300+
| Unsupported object type for driver | Fails immediately with driver-specific error |
301+
| CREATE DATABASE on SQLite | Fails with "not supported" error |
302+
| CREATE SCHEMA on SQLite | Fails with "not supported" error |
303303

304304
## Examples
305305

docs/templating.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Compute the SHA-256 hash of a string.
1515

1616
**Parameters:**
1717

18-
| Parameter | Type | Default | Description |
19-
| --------- | ------ | ------- | ---------------------------------------- |
18+
| Parameter | Type | Default | Description |
19+
| --------- | ------ | ------- | ----------------------------------- |
2020
| `mode` | string | `"hex"` | Output format: `"hex"` or `"bytes"` |
2121

2222
**Modes:**
@@ -94,8 +94,8 @@ decoded_cert: {{ env.B64_CERT | base64_decode }}
9494

9595
## Error Handling
9696

97-
| Error | Cause |
98-
| -------------------------------- | --------------------------------------------------------- |
99-
| `sha256: unsupported mode '…'` | Mode parameter is not `"hex"` or `"bytes"` |
100-
| `base64_decode: invalid input` | Input string is not valid Base64 |
101-
| `base64_decode: not valid UTF-8` | Decoded bytes are not a valid UTF-8 string |
97+
| Error | Cause |
98+
| -------------------------------- | ------------------------------------------ |
99+
| `sha256: unsupported mode '…'` | Mode parameter is not `"hex"` or `"bytes"` |
100+
| `base64_decode: invalid input` | Input string is not valid Base64 |
101+
| `base64_decode: not valid UTF-8` | Decoded bytes are not a valid UTF-8 string |

0 commit comments

Comments
 (0)