AshVersioned.Resource (ash_versioned v0.1.0)

Copy Markdown

Configures a resource for versioning. The source table gets a stable resource identifier, a version number, and a flag marking a row as the latest version, and mutations append new rows instead of updating in place.

Versioned resources must already have the following fields declared in attributes.

  • A surrogate primary key (uuid_v7_primary_key, integer_primary_key, or one already on a ported table). Composite keys are not supported.
  • Create and update timestamps (usually :inserted_at and :updated_at) with any non-null datetime-family attribute.

Summary

Functions

versioning(body)

(macro)