Block
Available
Free
Audit trail
- Version
- 0.1.0
- Database part
- Yes
The contract
Takes who did what to which record. Stores it in a way that cannot be quietly edited.
Settings
| Name | What it does |
|---|---|
| serverOnlyActions | Actions only the server may record, added by the app with one line in its own migration. |
| auditedTables | The app's own tables to record changes on, each given the block's trigger in the app's own migration. |
Requires
Live demo
The block keeps this record. The payment started as pending. Only the fields that changed are kept, and the card token is named without its value. The database adds the time itself.
{
"actor_id": "11111111-1111-4111-8111-111111111111",
"source": "user",
"action": "payment.updated",
"record_type": "payment",
"record_id": "pay_1042",
"record_label": "Invoice 1042",
"details": {
"changed": [
"card_token",
"status"
],
"before": {
"status": "pending"
},
"after": {
"status": "refunded"
}
}
}Once a record is kept, the database refuses every edit and delete, whoever asks. This runs the same code your app would run.