Refs #24928 -- Added introspection support for PostgreSQL HStoreField.

This commit is contained in:
Mariusz Felisiak 2025-11-14 13:36:15 +01:00 committed by GitHub
parent 0eec2a163a
commit 35f86b641a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 37 additions and 2 deletions

View file

@ -33,3 +33,16 @@ class InspectDBTests(PostgreSQLTestCase):
"null=True)",
],
)
def test_hstore_field(self):
from django.db.backends.postgresql.base import psycopg_version
if psycopg_version() < (3, 2):
self.skipTest("psycopg 3.2+ is required.")
self.assertFieldsInModel(
"postgres_tests_hstoremodel",
[
"field = django.contrib.postgres.fields.HStoreField(blank=True, "
"null=True)",
],
)