Record transitions + errors of batched jobs (New table)
We only have the last snapshot of the batched background migration job object. We are not able to see the event transition history. Not having this information recorded is terrible because sometimes we need to debug issues that happened in the past, and we don't have any records. Also, this data could be helpful for product managers. They will be able to extract information about what happened during the execution of a batched background migration.
I suggest that we add a new table where we register all of the state transitions.
Table Example:
- from: 'active' #string
- to: 'paused' #string
- extra_data: { trigger_by: 'user', example: 'example' } #json
- created_at: 'date_exampple'
- updated_at: 'date_example'
- error: 'error_example'
- batched_background_migration_job_id: 1 #FK
In this example, we are recording when the transition happened, the states involved (running -> failed), and some extra data.
Edited by Diogo Frazão