Skip to content
Browse documentation
Read data / ATH documentation

ath check

Validate the record and its sample files.

Usage

$ath check

Arguments

[file]
Optional record path. Defaults to the record in the current folder.

What it does

Checks SQLite integrity, schema versions, foreign keys, domain rules, record relationships, revision chains, session ordering and attachments. An error means the database breaks a rule of the format; a warning means something is worth knowing but the database is still valid. It reports problems without repairing or modifying the database.

A database created by v1.0.0 fails with "database metadata schema version is 1, expected 2" until you run ath migrate.

Examples

Use --validate-export to also build and validate a temporary complete JSON package. Validation errors return exit code 1.

$ath check --validate-export
$ath check --json

Options

--file <path>
check a database other than the one in this folder
--validate-export
also build and validate a temporary complete JSON package
--json
structured output, for an agent rather than a person

Related commands

Up nextath records →