mirror of
https://github.com/django/django.git
synced 2025-10-09 14:59:24 +00:00
Skipped NOT NULL constraints on PostgreSQL 18+.
Thanks Simon Charette for the implementation idea.
This commit is contained in:
parent
8b84364d46
commit
906a51e125
@ -206,7 +206,9 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
|||||||
cl.reloptions
|
cl.reloptions
|
||||||
FROM pg_constraint AS c
|
FROM pg_constraint AS c
|
||||||
JOIN pg_class AS cl ON c.conrelid = cl.oid
|
JOIN pg_class AS cl ON c.conrelid = cl.oid
|
||||||
WHERE cl.relname = %s AND pg_catalog.pg_table_is_visible(cl.oid)
|
WHERE cl.relname = %s
|
||||||
|
AND pg_catalog.pg_table_is_visible(cl.oid)
|
||||||
|
AND c.contype != 'n'
|
||||||
""",
|
""",
|
||||||
[table_name],
|
[table_name],
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user