diff options
Diffstat (limited to 'django/db/backends/postgresql/features.py')
-rw-r--r-- | django/db/backends/postgresql/features.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/django/db/backends/postgresql/features.py b/django/db/backends/postgresql/features.py index f8d2ea1286..f11558c791 100644 --- a/django/db/backends/postgresql/features.py +++ b/django/db/backends/postgresql/features.py @@ -22,10 +22,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): can_release_savepoints = True supports_tablespaces = True supports_transactions = True - can_introspect_autofield = True - can_introspect_ip_address_field = True can_introspect_materialized_views = True - can_introspect_small_integer_field = True can_distinct_on_fields = True can_rollback_ddl = True supports_combined_alters = True @@ -62,6 +59,15 @@ class DatabaseFeatures(BaseDatabaseFeatures): has_json_operators = True @cached_property + def introspected_field_types(self): + return { + **super().introspected_field_types, + 'PositiveBigIntegerField': 'BigIntegerField', + 'PositiveIntegerField': 'IntegerField', + 'PositiveSmallIntegerField': 'SmallIntegerField', + } + + @cached_property def is_postgresql_10(self): return self.connection.pg_version >= 100000 |