10 lines
584 B
SQL
10 lines
584 B
SQL
-- Archive is an inventory visibility preference. Trust/revocation remains on the installation.
|
|
ALTER TABLE assets ADD COLUMN archived_at timestamptz;
|
|
GRANT UPDATE(archived_at) ON assets TO rmm_app;
|
|
CREATE INDEX observations_device_summary ON observations
|
|
(tenant_id, agent_id, observed_at DESC, received_at DESC, sequence DESC)
|
|
WHERE source_id IN ('windows.base','linux.base');
|
|
CREATE INDEX agent_installations_asset_generation ON agent_installations
|
|
(tenant_id,asset_id,enrollment_generation)
|
|
WHERE last_contact_at IS NOT NULL AND last_authenticated_at IS NOT NULL;
|