What problem does it solve?
Performs controlled bulk deletion of transactions from the OptimalOS transactions table to remove bad imports, duplicate batches, or test data while preserving provenance through auditing and scoped filters.
Core Features & Use Cases
- Scoped filtering: Support for batch-id, user-id, date-range, and bank/source to precisely target records.
- Safe execution: Counts affected rows, supports dry-run previews, requires explicit confirmation, and deletes in controlled batches.
- Auditability: Inserts audit records into cli_task_logs and optionally marks upload_batches as deleted to maintain provenance.
- Use case: Remove an erroneous CSV import by deleting all transactions associated with its upload batch and marking the batch as deleted.
Quick Start
Use the delete-batch command to preview deletions for batch 42 with a dry run and then confirm to execute the removal.