paper_firehose.commands.migrate_db¶
Database migration command.
Migrates existing databases to the optimised schema: - Archives raw_data to a separate raw_archive.db - Drops the raw_data column from all three databases - Applies performance pragmas (auto_vacuum, page_size) - Runs VACUUM to reclaim space
Functions
|
Run the database migration. |
- paper_firehose.commands.migrate_db.run(config_path, *, skip_archive=False, dry_run=False)[source]¶
Run the database migration.
Back up all three DBs
Archive raw_data to raw_archive.db (unless –skip-archive)
Rebuild tables without raw_data column
Drop stale FTS indexes (rebuilt on next DB open)
Apply pragmas and VACUUM