• Douglas Barbosa Alexandre's avatar
    Use NOT VALID to enforce a not null constraint on file_store · 87f9da1c
    Douglas Barbosa Alexandre authored
    When adding a constraint to a table, we can optionally include
    NOT VALID. This tells Postgres that it doesn’t need to enforce
    the constraint on existing records in the table. At least not
    immediately. This constraint will be enforced for any updates
    and subsequent insertions. Thus, we can immediately enforce
    the constraint while giving ourselves time to clean up any
    existing records that conflict with the constraint.
    87f9da1c
structure.sql 494 KB