database driver ships with three retention modes that cover the most common operational needs: keep everything forever, discard records older than a configurable number of days, or maintain a fixed-size rolling window of the most recent records per table. Retention is declared in config/model-scribe.php and enforced on-demand when you run model-scribe:prune.
Retention modes
- Permanent
- Days
- Rotating
The default mode. ModelScribe never deletes records automatically — every
audit entry is kept indefinitely. Use this when your compliance or legal
requirements mandate a full immutable history, or when you manage archival
and deletion outside of ModelScribe.Running
model-scribe:prune while type is 'permanent' is a safe no-op
— it returns 0 deleted records and touches no rows.Retention is enforced at prune-time
ModelScribe does not delete records on insert. Entries accumulate in the database as they are written, and the configured policy is only enforced when you explicitly trigger a prune. This means your tables may grow beyond the retention threshold between prune runs — plan your schedule accordingly. Run the prune command manually at any time:The
file driver’s prune() method is intentionally a no-op and always
returns 0. Log file rotation for the file driver is handled entirely by
Laravel’s built-in logging system. Configure it in config/logging.php using
the daily channel’s days option or whichever channel you have pointed
MODEL_SCRIBE_LOG_CHANNEL at.