Task: B1: Extend entity SQL template to cover full table-template data shape

Table of Contents

This page documents a task in the Resolve codegen model unification blockers story. It captures the goal, current status, acceptance, and any notes or results.

Goal

sql_schema_domain_entity_create.mustache, when given a domain_entity model populated with the fields added by B3, produces SQL output byte-identical to sql_schema_create.mustache for every dual-file entity. The table template is not deleted yet.

Status

Field Value
State DONE
Parent story Resolve codegen model unification blockers
Now Done. PR #1355 merged.
Waiting on Nothing.
Next Nothing.
Last touched 2026-06-27

Acceptance

  • Template renders coding_scheme_code column when domain_entity.coding_scheme is set
  • Template renders image_id column when domain_entity.has_image_id is true
  • Template renders the validation function body from domain_entity.validation_fn
  • Template renders insert_trigger.validations rows when present
  • Byte-identical SQL output verified for at least one dual-file entity (e.g. party_status)

Plan

(Implementation strategy. Written when work starts; key decisions are distilled into the parent story's * Decisions at close, but the plan itself stays — it is the historical record of what we did.)

Notes

PRs

PR Title
#1355 [codegen] Resolve codegen model unification blockers

Review

Comment summary File Decision Notes
       

Result

Emacs 29.3 (Org mode 9.6.15)