mirror of
https://github.com/django/django.git
synced 2025-12-23 09:19:27 +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
1 changed files with 3 additions and 1 deletions
|
|
@ -206,7 +206,9 @@ class DatabaseIntrospection(BaseDatabaseIntrospection):
|
|||
cl.reloptions
|
||||
FROM pg_constraint AS c
|
||||
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],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue