diff --git a/src/main/resources/db/migration/V5__posture_device_id_nullable.sql b/src/main/resources/db/migration/V5__posture_device_id_nullable.sql new file mode 100644 index 0000000..7b543fd --- /dev/null +++ b/src/main/resources/db/migration/V5__posture_device_id_nullable.sql @@ -0,0 +1,3 @@ +-- device_id retained its NOT NULL constraint after the PK was dropped in V4. +-- Make it nullable so agents that don't send a numeric deviceId can persist. +ALTER TABLE device_security_posture ALTER COLUMN device_id DROP NOT NULL;