Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | TINYINT UNSIGNED | 3 | 1 |
|
|
||||||||||||||||||||||||||||||||||||
| current_month | DATE | 10 | 2025-12-01 |
|
|
First day of the month currently being purged |
|||||||||||||||||||||||||||||||||||
| status | enum('active', 'paused', 'completed') | 9 | active |
|
|
||||||||||||||||||||||||||||||||||||
| retention_months | TINYINT UNSIGNED | 3 | 3 |
|
|
Keep rows with created_at within this many months of today |
|||||||||||||||||||||||||||||||||||
| batch_size | INT UNSIGNED | 10 | 5000 |
|
|
||||||||||||||||||||||||||||||||||||
| max_batches_per_run | INT UNSIGNED | 10 | 100 |
|
|
||||||||||||||||||||||||||||||||||||
| rows_deleted_last_run | BIGINT UNSIGNED | 20 | 0 |
|
|
||||||||||||||||||||||||||||||||||||
| rows_deleted_current_month | BIGINT UNSIGNED | 20 | 0 |
|
|
||||||||||||||||||||||||||||||||||||
| rows_deleted_total | BIGINT UNSIGNED | 20 | 0 |
|
|
||||||||||||||||||||||||||||||||||||
| last_run_at | TIMESTAMP | 19 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| last_run_status | VARCHAR | 64 | √ | null |
|
|
in_progress, month_completed, retention_reached, paused, error |
||||||||||||||||||||||||||||||||||
| last_run_message | VARCHAR | 255 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| last_batch_failed | BIT | 1 | 0 |
|
|
1 if the last batch delete failed |
|||||||||||||||||||||||||||||||||||
| created_at | TIMESTAMP | 19 | √ | CURRENT_TIMESTAMP |
|
|
|||||||||||||||||||||||||||||||||||
| updated_at | TIMESTAMP | 19 | √ | CURRENT_TIMESTAMP |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | id |

