Validate partition_id NOT NULL on vulnerability_occurrence_identifiers

What does this MR do and why?

The NOT NULL check constraint on vulnerability_occurrence_identifiers.partition_id (check_aacd1ff57e) was previously added as NOT VALID. This MR adds a post-deployment migration that synchronously validates the constraint, so it is enforced for all existing rows. This is the standard second phase of the add-then-validate pattern for NOT NULL constraints on large tables.

Migration output

== 20260629092108 ValidateVulnerabilityOccurrenceIdentifiersPartitionIdNotNull: migrating
-- execute("ALTER TABLE vulnerability_occurrence_identifiers VALIDATE CONSTRAINT check_aacd1ff57e;")
== 20260629092108 ValidateVulnerabilityOccurrenceIdentifiersPartitionIdNotNull: migrated

Constraint status on thin clone

    "check_aacd1ff57e" CHECK (partition_id IS NOT NULL)

References

References #596858 (closed)

Edited by Michał Zając

Merge request reports

Loading
Loading