Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | int8 | 19 | √ | null |
|
|
|||||
| type_id | int4 | 10 | null |
|
|
||||||
| device_id | int8 | 19 | √ | null |
|
|
|||||
| name | text | 2147483647 | null |
|
|
||||||
| units | text | 2147483647 | √ | null |
|
|
For numeric timeseries, the units represented by the values; unit names should be short (possibly abbreviations) and in the default language of the site. |
||||
| decimal_places | int4 | 10 | √ | null |
|
|
For numeric timeseries, the number of digits after the decimal point to display. |
||||
| created_time | timestamptz | 35,6 | now() |
|
|
||||||
| modified_time | timestamptz | 35,6 | now() |
|
|
||||||
| created_by | int8 | 19 | null |
|
|
||||||
| modified_by | int8 | 19 | null |
|
|
||||||
| retention_days | int4 | 10 | √ | null |
|
|
If non-null, only retain values for this many days. If null, do not expire old timeseries values. |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| timeseries_pkey | Primary key | Asc | id |
| timeseries_unique_name_per_device | Must be unique | Asc/Asc | device_id + name |
Check Constraints
| Constraint Name | Constraint |
|---|---|
| timeseries_units_check | (units !~ similar_to_escape(' *'::text)) |
| timeseries_decimal_places_check | (decimal_places >= 0) |