device_managers

0 rows


Description

Information about device managers. This is a combination of information from the Balena API and locally-generated values.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id int8 19 null
balena_id int8 19 null

Balena-assigned device identifier.

balena_modified_time timestamptz 35,6 null

Last modification timestamp from Balena. This is distinct from refreshed_time, which is updated locally.

device_name text 2147483647 null
is_online bool 1 null
last_connectivity_event timestamptz 35,6 null
update_progress int4 10 null

Percent complete of software download and installation (0-100). Null if no software update is in progress.

sensor_kit_id text 2147483647 null

ID code that is physically printed on the sensor kit and set as a tag value in the Balena device configuration.

user_id int8 19 null
users.id device_managers_user_id_fkeyR
facility_id int8 19 null
facilities.id device_managers_facility_id_fkeyR
created_time timestamptz 35,6 null

When this device manager was added to the local database. The Balena device may have been created earlier.

refreshed_time timestamptz 35,6 null
balena_uuid text 2147483647 null

Indexes

Constraint Name Type Sort Column(s)
device_managers_pkey Primary key Asc id
device_managers_balena_id_unique Must be unique Asc balena_id
device_managers_balena_uuid_unique Must be unique Asc balena_uuid
device_managers_facility_id_key Must be unique Asc facility_id
device_managers_short_code_key Must be unique Asc sensor_kit_id
device_managers_user_id_idx Performance Asc user_id

Check Constraints

Constraint Name Constraint
device_managers_user_iff_facility ((((user_id IS NOT NULL) AND (facility_id IS NOT NULL)) OR ((user_id IS NULL) AND (facility_id IS NULL))))

Relationships