Django PlanetScale database engine. This package is a better solution for planetscale/django_psdb_engine.
- Free software: MIT license
Make this database engine ready in two simple steps. First thing first, install the package.
$ pip install django-psdb-engineAnd finally, update your databases configuration by changing the ENGINE field.
DATABASES = {
'default': {
'ENGINE': 'django_psdb_engine',
...
'OPTIONS': {'ssl': {'ca': ...}}
}
}Note: Since Django uses the UTF-8 charset and it points to utf8mb3 in MySQL and this charset is deprecated in MySQL 8, you may need to add {"charset": "utf8mb4"} and migrate your chanegs with no problem.
...
-'OPTIONS': {'ssl': {'ca': os.environ.get('MYSQL_ATTR_SSL_CA')}}
+'OPTIONS': {'ssl': {'ca': os.environ.get('MYSQL_ATTR_SSL_CA')}, 'charset': 'utf8mb4'}
...- django >= 2.2
- mysqlclient >= 2.1.0