fix(postgres): a partition's inherited NOT NULL is its column's · DBDiff/DBDiff@c4bf94e · GitHub
Skip to content

Commit c4bf94e

Browse files
jasdeepkhalsaclaude
andcommitted
fix(postgres): a partition's inherited NOT NULL is its column's
From PostgreSQL 18 a NOT NULL is a constraint, and a partition, or a child under INHERITS, inherits its parent's under the parent's name. Not the name a table's own would have, it was read as a constraint of the partition's own, and those copies made the parent's name look shared, so the parent's too: against an older server every partitioned table read as altered, offering to drop the constraint and add the NOT NULL back. An inherited NOT NULL comes with the parent and is now the column's NOT NULL, as before PostgreSQL 18. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 1999925 commit c4bf94e

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

‎src/DB/Adapters/PostgresAdapter.php‎

Lines changed: 9 additions & 2 deletions

‎tests/CrossVersionPostgresTest.php‎

Lines changed: 7 additions & 0 deletions

0 commit comments

Comments
 (0)