diff --git a/migrations/0046_opnsense_inventory.sql b/migrations/0046_opnsense_inventory.sql new file mode 100644 index 0000000..9f57afe --- /dev/null +++ b/migrations/0046_opnsense_inventory.sql @@ -0,0 +1,6 @@ +SET LOCAL lock_timeout = '3s'; +SET LOCAL statement_timeout = '30s'; +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','opnsense.base')) NOT VALID; +ALTER TABLE observations VALIDATE CONSTRAINT observations_source_id_check;