@trajectonomics/cli 0.8.0-alpha.10 → 0.8.0-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -250,6 +250,28 @@ traj backup --out ~/traj-backup-2026-11-30
|
|
|
250
250
|
traj data remove --confirm ~/.traj --backup ~/traj-backup-2026-11-30
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
+
### Going back after an upgrade
|
|
254
|
+
|
|
255
|
+
> **Ships in 0.8.0.**
|
|
256
|
+
|
|
257
|
+
When a newer `traj` has to migrate your database to a newer schema, it first copies it beside the
|
|
258
|
+
original as `traj.db.pre-v<N>.bak`, where `N` is the schema version the copy holds, and says so once
|
|
259
|
+
on stderr. Each copy is about the size of the database, so the upgrade needs that much free space;
|
|
260
|
+
if the copy cannot be written (a full disk, a directory that is not writable) the database is not
|
|
261
|
+
migrated and nothing changes. A new, empty ledger is not copied.
|
|
262
|
+
|
|
263
|
+
An older `traj` refuses a database a newer one has migrated, so to go back: stop every `traj`,
|
|
264
|
+
install the release you used before (the
|
|
265
|
+
[releases page](https://github.com/trajectonomics/trajectonomics/releases) lists them; `traj doctor`
|
|
266
|
+
on it reports the schema version it writes as `head`, which must equal `N`), delete `traj.db`,
|
|
267
|
+
`traj.db-wal` and `traj.db-shm` in the data directory, and copy the `.bak` file to `traj.db`.
|
|
268
|
+
Changes made after the upgrade are lost: the copy is the database as it was.
|
|
269
|
+
|
|
270
|
+
`traj doctor` lists the copies as `database.preMigrationCopies`, and any half-written one a crash
|
|
271
|
+
left as `database.unfinishedCopies`. `traj data remove` leaves the copies, because they are separate
|
|
272
|
+
files you can delete when you no longer need them, and its refusal names them: they hold your
|
|
273
|
+
data in plain text.
|
|
274
|
+
|
|
253
275
|
## Telemetry
|
|
254
276
|
|
|
255
277
|
`traj` counts its own use, so the project can see how many people run it each week. After a command finishes, a detached process sends one anonymous event to PostHog (EU), so the command never waits for the network. The event holds:
|