MishkaCmsCore. Runtime. Resources. Mixins. JsHookPaperTrailMixin
(Mishka CMS Core v0.0.1)
Copy Markdown
View Source
Mixin for configuring PaperTrail version tracking on JsHook resources.
This mixin provides the database and action configuration needed for the PaperTrail extension to track js_hook versions. It defines the version table structure, database relationships, and actions required for version management, ensuring consistent configuration across the js_hook versioning system.
The mixin sets up the 'js_hook_versions' table with proper foreign key references that cascade delete when the source js_hook 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 JsHook resource definition, improving maintainability and allowing the versioning setup to be reused or modified independently. The configuration ensures that js_hook history is properly tracked while maintaining referential integrity.
Summary
Functions
Generates the PostgreSQL configuration for js_hook version tracking.