Closed sevdog closed 2 years ago
Merging #612 (217d5b0) into master (13a2c6f) will decrease coverage by
0.02%
. The diff coverage is50.00%
.
@@ Coverage Diff @@
## master #612 +/- ##
==========================================
- Coverage 68.30% 68.27% -0.03%
==========================================
Files 24 24
Lines 1101 1100 -1
Branches 173 173
==========================================
- Hits 752 751 -1
Misses 312 312
Partials 37 37
Impacted Files | Coverage Δ | |
---|---|---|
push_notifications/fields.py | 60.93% <50.00%> (-0.61%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 13a2c6f...217d5b0. Read the comment docs.
As of now
HexIntegerField
relies onconnection.settings_dict["ENGINE"]
to determinate if the database supports specific feature.Since a custom engine may be defined by any user this has some limitation because engines are hard-coded.
The preferred approach would be to use
connection.feature_class.<feature>
, but ATM there is no flag in these classes which may help here (ie:supports_unsigned_integers
).My solution here is to rely on
connection.vendor
because it should be more robust and could handle subclassing of any existent backend, if that backend has some kind of differences it could just overridevendor
attribute (ie:postgresql
->custom-postgresql
).Also this saves us some configurations since
django.db.backends.postgresql
,django.db.backends.postgresql_psycopg2
anddjango.contrib.gis.db.backends.postgis
have allvendor = "posrgresql"
, and we also get spatiallite (which is based on sqlite and has the same datatypes).