Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| asset_id | int8 | 19 | √ | null |
|
|
Unique surrogate identifier for the individual asset. |
||||||||||
| parent_id | int8 | 19 | √ | null |
|
|
ID of the parent container asset (e.g., Campsite, Day Use Area, Zone). NULL if top-level. |
||||||||||
| asset_tag | varchar | 50 | √ | null |
|
|
Physical barcode, field tag, or campsite designation (e.g., CS-012, TBL-012-A). |
||||||||||
| rec_resource_id | varchar | 20 | null |
|
|
FK to the parent Recreation Resource / Site (rst.recreation_resource). |
|||||||||||
| asset_code | int4 | 10 | null |
|
|
Asset classification type (FK to rst.recreation_asset_code.asset_code). |
|||||||||||
| asset_name | varchar | 200 | √ | null |
|
|
Optional display name for the asset. UI defaults to asset_code description when null. |
||||||||||
| asset_comment | text | 2147483647 | √ | null |
|
|
Free-text note or migrated structure_name value for this asset. |
||||||||||
| legacy_structure_id | varchar | 20 | √ | null |
|
|
Informational string reference to the legacy aggregate recreation_structure record. |
||||||||||
| asset_length | numeric | 7,1 | √ | null |
|
|
Total length in metres (paths, boardwalks, fences, bridges). |
||||||||||
| asset_width | numeric | 7,1 | √ | null |
|
|
Total width in metres (parking areas, shelters, docks). |
||||||||||
| asset_area | numeric | 7,1 | √ | null |
|
|
Total area in square metres. |
||||||||||
| default_value | numeric | 7,2 | √ | null |
|
|
Default value for the asset, derived from the structure type value/dimension. |
||||||||||
| actual_value | numeric | 7,2 | √ | null |
|
|
Actual value of the asset; takes precedence over the default value when set. |
||||||||||
| installation_date | date | 13 | √ | null |
|
|
Date the asset was installed in the field. |
||||||||||
| updated_at | timestamp | 29,6 | √ | now() |
|
|
|||||||||||
| updated_by | text | 2147483647 | √ | null |
|
|
|||||||||||
| created_at | timestamp | 29,6 | √ | now() |
|
|
|||||||||||
| created_by | text | 2147483647 | √ | null |
|
|
|||||||||||
| sys_period | tstzrange | 2147483647 | tstzrange(CURRENT_TIMESTAMP, NULL::timestamp with time zone) |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| recreation_asset_pkey | Primary key | Asc | asset_id |
| idx_recreation_asset_code | Performance | Asc | asset_code |
| idx_recreation_asset_parent_id | Performance | Asc | parent_id |
| idx_recreation_asset_site | Performance | Asc | rec_resource_id |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| chk_no_self_parent | (parent_id <> asset_id) |



