# `MishkaCmsCore.Runtime.Resources.Mixins.MediaCategoryPaperTrailMixin`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.1/lib/mishka_cms_core/runtime/resources/__mixins/media_category_paper_trail_mixin.ex#L5)

Mixin for configuring PaperTrail version tracking on MediaCategory resources.

This mixin provides the database and action configuration needed for the
PaperTrail extension to track media category versions. It defines the version table
structure, database relationships, and actions required for version management,
ensuring consistent configuration across the media category versioning system.

The mixin sets up the 'media_category_versions' table with proper foreign key references
that cascade delete when the source media category is removed. It also defines a bypass
action for retrieving versions without tenant restrictions, enabling cross-site
version access for administrative purposes.

By using a mixin approach, the versioning configuration is kept separate from
the main MediaCategory resource definition, improving maintainability and allowing the
versioning setup to be reused or modified independently. The configuration ensures
that media category history is properly tracked while maintaining referential integrity.

# `postgres`

Generates the PostgreSQL configuration for media category version tracking.

Returns quoted code that defines the version table, repository, and
foreign key relationships with cascade delete behavior.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
