PhoenixKitProjects.Schemas.ProjectModule (PhoenixKitProjects v0.21.1)

Copy Markdown View Source

Per-project extension enablement row (phoenix_kit_project_modules).

One row = one extension instance on one project. instance_key defaults to "default" and participates in the unique identity (project_uuid, ext_key, instance_key) — v1 exposes toggle semantics but the identity is instance-ready by design (2026-08-05 panel finding).

enabled is a flag rather than row-existence so a disable preserves config (and the extension's own data — Redmine semantics: disabling hides, never deletes). config holds per-instance settings validated against the extension's declared config_schema — writes go through PhoenixKitProjects.Extensions.update_config/4, which whitelists keys; never cast raw params into it.

enabled_by_uuid is best-effort provenance with NO foreign key — the same convention as activity actor_uuid throughout this module: a stale or unresolvable actor must never fail the admin's toggle (first caught by the panel LV test — a fake-scope actor FK-crashed the whole toggle). The activity log remains the authoritative audit trail.

Summary

Types

t()

@type t() :: %PhoenixKitProjects.Schemas.ProjectModule{
  __meta__: term(),
  config: term(),
  enabled: term(),
  enabled_by_uuid: term(),
  ext_key: term(),
  inserted_at: term(),
  instance_key: term(),
  name: term(),
  project_uuid: term(),
  updated_at: term(),
  uuid: term()
}

Functions

changeset(row, attrs)