Skip to content

Add audit logging / change tracking #9

@quinnjr

Description

@quinnjr

Description

Automatic audit logging for all database changes.

Features

  • Track created_at, updated_at automatically
  • Track created_by, updated_by with user context
  • Optional full change history table
  • Configurable per-model
  • Access audit trail via API

Schema

model User {
    id        Int      @id @auto
    email     String
    @@audit(track: [create, update, delete])
}

Usage

// Get audit history
let history = client.user()
    .audit_log(user::id::equals(1))
    .exec().await?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions