rai db
SQLite personal database diagnostics and backup. These commands operate on the local RaiSE database at ~/.rai/raise.db (canonical) and the per-project replica at .raise/rai/raise.db.
Do not modify
.raise/**/*.dbfiles directly. Always use the CLI to prevent data loss or schema corruption.
rai db check¶
Run integrity checks on the local SQLite database. Reports any corruption, schema drift, or version mismatches.
rai db status¶
Show database status — path, size, schema version, last migration, and record counts.
rai db consolidate¶
Merge the per-project replica into the global canonical database at ~/.rai/raise.db. Use after switching machines or worktrees.
rai db migrate¶
Apply pending schema migrations to the local database.
rai db export¶
Export database contents to a portable format (JSON or SQL dump).
rai db import¶
Import a previously exported backup into the local database.
See also: rai doctor, rai session