Skip to content

Commit

Permalink
Add support for Django CockroachDB driver
Browse files Browse the repository at this point in the history
As per #509 adds support for Django CockroachDB
  • Loading branch information
stevewilliamsuk authored and sergeyklay committed Nov 3, 2024
1 parent f53b3f4 commit 6f0a91b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions environ/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class Env:
'psql': DJANGO_POSTGRES,
'pgsql': DJANGO_POSTGRES,
'postgis': 'django.contrib.gis.db.backends.postgis',
'cockroachdb': 'django_cockroachdb',
'mysql': 'django.db.backends.mysql',
'mysql2': 'django.db.backends.mysql',
'mysql-connector': 'mysql.connector.django',
Expand Down
9 changes: 9 additions & 0 deletions tests/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@
'',
''
),
# cockroachdb://username:[email protected]:26258/dbname
('cockroachdb://username:[email protected]:26258/dbname',
'django_cockroachdb',
'dbname',
'test.example.com',
'username',
'secret',
26258),
# mysqlgis://user:password@host:port/dbname
('mysqlgis://enigma:[email protected]:5431/dbname',
'django.contrib.gis.db.backends.mysql',
Expand Down Expand Up @@ -156,6 +164,7 @@
'postgis',
'postgres_cluster',
'postgres_no_ports',
'cockroachdb',
'mysqlgis',
'cleardb',
'mysql_no_password',
Expand Down

0 comments on commit 6f0a91b

Please sign in to comment.