Adventure Labs Logo
Scout Docs

Parts

Table for storing device parts with serial numbers and certificates

Column NameData TypeConstraints
idbigintNOT NULL
created_attimestamp with time zoneDEFAULT now() NOT NULL
device_idbigintNOT NULL
serial_numbertextNOT NULL
product_numbertextNOT NULL
certificate_idbigint
statuspublic.component_statusDEFAULT 'active' NOT NULL
updated_attimestamp with time zoneDEFAULT now()

Security Policies (RLS)

This table has Row Level Security (RLS) enabled with the following policies:

  • Read Access: Device API keys within the same herd as the associated device OR users with view role in the same herd
  • Create/Update/Delete: Only admins or the device associated with the part can modify records

On this page