chkit status
Reports the current migration state by comparing migration files on disk against the journal. Does not connect to ClickHouse.
Synopsis
Section titled “Synopsis”chkit status [flags]No command-specific flags. See global flags.
Behavior
Section titled “Behavior”chkit status reads the migrations directory and journal.json to compute:
- Total migration files (
.sqlfiles inmigrationsDir, sorted alphabetically) - Applied migrations (entries recorded in the journal)
- Pending migrations (on disk but not yet applied)
- Checksum mismatches (applied migrations whose SHA-256 checksum no longer matches the file on disk)
This command is read-only and does not require a ClickHouse connection.
Examples
Section titled “Examples”chkit statusMigrations: 5 total, 3 applied, 2 pendingChecksum mismatches: 0chkit status --jsonExit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
| 0 | Always succeeds |
JSON output
Section titled “JSON output”{ "command": "status", "schemaVersion": 1, "migrationsDir": "/absolute/path/to/migrations", "total": 5, "applied": 3, "pending": 2, "pendingMigrations": ["0004_add_column.sql", "0005_create_index.sql"], "checksumMismatchCount": 0, "checksumMismatches": []}When checksum mismatches are detected, each entry includes the migration name, expected checksum (from the journal), and actual checksum (from the file on disk).
Related commands
Section titled “Related commands”chkit migrate— apply pending migrationschkit check— CI gate that evaluates pending migrations and checksums