Skip to content

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

Columns of app.template_versions
ColumnTypeNullableDescription
iduuidNoPrimary key, UUID v7.
org_iduuidNoOwning org, derived from app.templates on insert; never accepted from the caller and never changed.References app.organizations.id
template_iduuidNoTemplate the version belongs to.References app.templates.id
version_numberintegerNoVersion number, issued in order on insert, 1 first.
notestextYesWhat changed in this version.
default_time_zonetextYesIANA time zone a new project starts with, when the person applying does not give one.
default_tier_codetextYesCanon tier a new project starts with.References xpms.dim_tier.tier_code
default_region_codetextYesCanon region a new project starts with.References xpms.dim_region.region_code
default_jurisdiction_idtextYesCanon jurisdiction a new project starts with.References xpms.jurisdiction.jurisdiction_id
default_currency_codecharacter(3)YesISO 4217 currency a new project starts with.References private.currencies.currency_code
duration_daysintegerYesLength of the project in days; the end date is the start date plus this length less one day.
published_attimestamp with time zoneYesWhen the version was published; NULL while it is a draft. Set only by app.publish_template_version.
deleted_attimestamp with time zoneYesSoft delete time. A row with deleted_at set is ignored by every access helper.
created_attimestamp with time zoneNoWhen the row was inserted. Set by the database.
created_byuuidYesPerson who inserted the row, or null for a platform process. Set by the database.References app.people.id
updated_attimestamp with time zoneNoWhen the row last changed. Set by the database.
updated_byuuidYesPerson who last changed the row, or null for a platform process. Set by the database.References app.people.id