Only set collation option for mysql test database

This commit is contained in:
Oliver 2022-04-22 11:31:51 +10:00
parent dc0f18d21f
commit 2f1e869351

View File

@ -549,14 +549,16 @@ db_config['OPTIONS'] = db_options
# Set testing options for the database # Set testing options for the database
db_config['TEST'] = { db_config['TEST'] = {
'CHARSET': 'utf8', 'CHARSET': 'utf8',
'COLLATION': 'utf8_general_ci',
} }
# Set collation option for mysql test database
if 'mysql' in db_engine:
db_config['TEST']['COLLATION'] = 'utf8_general_ci'
DATABASES = { DATABASES = {
'default': db_config 'default': db_config
} }
_cache_config = CONFIG.get("cache", {}) _cache_config = CONFIG.get("cache", {})
_cache_host = _cache_config.get("host", os.getenv("INVENTREE_CACHE_HOST")) _cache_host = _cache_config.get("host", os.getenv("INVENTREE_CACHE_HOST"))
_cache_port = _cache_config.get( _cache_port = _cache_config.get(