V154: OpenGraph templates + hierarchical assignments
(phoenix_kit_og plugin).
phoenix_kit_og_templates
Reusable OG canvas designs. canvas is JSONB so the structure can
grow new element types without a schema change. preview_image_uuid
is an optional pointer to a rendered cached preview.
phoenix_kit_og_assignments
Binds a template to a scope inside a consumer module's hierarchy. The
(module_key, scope_type, scope_uuid) triple is unique — enforced via
a partial-index pair because PostgreSQL treats NULL as distinct:
- one row per
(module, scope_type)whenscope_uuid IS NULL(the module-wide default tier) - one row per
(module, scope_type, scope_uuid)when not null
template_uuid cascades on delete: removing a template wipes every
assignment that pointed at it.
All operations are idempotent.