app.template_versions
TableRow level security on
Versions of a template: project defaults and ordered items. Edited while a draft; frozen once published.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.templates on insert; never accepted from the caller and never changed.References app.organizations.id |
| template_id | uuid | No | Template the version belongs to.References app.templates.id |
| version_number | integer | No | Version number, issued in order on insert, 1 first. |
| notes | text | Yes | What changed in this version. |
| default_time_zone | text | Yes | IANA time zone a new project starts with, when the person applying does not give one. |
| default_tier_code | text | Yes | Canon tier a new project starts with.References xpms.dim_tier.tier_code |
| default_region_code | text | Yes | Canon region a new project starts with.References xpms.dim_region.region_code |
| default_jurisdiction_id | text | Yes | Canon jurisdiction a new project starts with.References xpms.jurisdiction.jurisdiction_id |
| default_currency_code | character(3) | Yes | ISO 4217 currency a new project starts with.References private.currencies.currency_code |
| duration_days | integer | Yes | Length of the project in days; the end date is the start date plus this length less one day. |
| published_at | timestamp with time zone | Yes | When the version was published; NULL while it is a draft. Set only by app.publish_template_version. |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |