backfill-audit-fields

command
v0.10.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Command backfill-audit-fields stamps the platform audit fields (PADR-0001) on admin-api's pre-convention documents: updated_by on banners, and created_by / updated_by on maintenance_modes. created_at / updated_at are already present on both. No acting user was recorded historically, so a missing *_by is set to the "system" sentinel; on a banner an existing created_by seeds updated_by instead.

banners and maintenance_modes are hard-delete operational records (PADR-0027) - there is no deleted_at / deleted_by pair to backfill.

Idempotent - a document that already has updated_by is skipped. Dry run by default.

go run ./cmd/backfill-audit-fields          # report counts, write nothing
go run ./cmd/backfill-audit-fields -apply   # perform the writes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL