10 lines
588 B
SQL
10 lines
588 B
SQL
-- Passive agent-update observations share the existing tenant/device-bound
|
|
-- ingest path. Preserve both base scopes and every existing row/RLS/FK.
|
|
-- SQLx applies this file transactionally and records its normal checksum.
|
|
SET LOCAL lock_timeout = '3s';
|
|
SET LOCAL statement_timeout = '15s';
|
|
ALTER TABLE observations DROP CONSTRAINT observations_source_id_check;
|
|
ALTER TABLE observations ADD CONSTRAINT observations_source_id_check
|
|
CHECK (source_id IN ('linux.base', 'windows.base', 'agent.update')) NOT VALID;
|
|
ALTER TABLE observations VALIDATE CONSTRAINT observations_source_id_check;
|