mirror of
https://github.com/django/django.git
synced 2025-07-17 08:09:13 +00:00
[3.1.x] Refs #32096 -- Made JSONField check respect Meta.required_db_vendor.
Thanks Simon Charette for the implementation idea. Backport of 1fb97fb965786a4398a2236e4e619b78a25d5875 from master
This commit is contained in:
parent
848e48c62d
commit
be3ce38656
@ -45,6 +45,11 @@ class JSONField(CheckFieldDefaultMixin, Field):
|
||||
if not router.allow_migrate_model(db, self.model):
|
||||
continue
|
||||
connection = connections[db]
|
||||
if (
|
||||
self.model._meta.required_db_vendor and
|
||||
self.model._meta.required_db_vendor != connection.vendor
|
||||
):
|
||||
continue
|
||||
if not (
|
||||
'supports_json_field' in self.model._meta.required_db_features or
|
||||
connection.features.supports_json_field
|
||||
|
Loading…
x
Reference in New Issue
Block a user