Skip to content

Commit

Permalink
Set mysql as default db on travis configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
mandrade2 committed Jun 17, 2020
1 parent 0123615 commit f48100f
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions pootle/settings/91-travis.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,31 @@ if os.environ.get("TRAVIS"):
DATABASE_BACKEND = os.environ.get("DB")
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': working_path('dbs/zing_travis.db'),
'USER': '',
'ENGINE': 'django.db.backends.mysql',
'NAME': "zing",
'USER': 'travis',
'PASSWORD': '',
'HOST': '',
'PORT': '',
'ATOMIC_REQUESTS': True,
'CHARSET':'utf8mb4',
'COLLATION':'utf8mb4_unicode_ci',
'TEST': {
'NAME': '',
'CHARSET': 'utf8',
'NAME': 'test_zing',
'CHARSET':'utf8mb4',
'COLLATION':'utf8mb4_unicode_ci'
},
"OPTIONS":{
'init_command': "SET sql_mode='STRICT_ALL_TABLES'",
}
}
}

if DATABASE_BACKEND.startswith("mysql"):
DATABASES['default']['ENGINE'] = 'django.db.backends.mysql'
DATABASES['default']['NAME'] = 'zing'
if DATABASE_BACKEND.startswith("sqlite"):
DATABASES['default']['ENGINE'] = 'django.db.backends.sqlite'
DATABASES['default']['NAME'] = working_path('dbs/zing_travis.db')
DATABASES['default']['USER'] = 'travis'
DATABASES['default']['TEST']['COLLATION'] = 'utf8mb4_unicode_ci'
DATABASES['default']['TEST']['CHARSET'] = 'utf8mb4'
DATABASES['default']['OPTIONS'] = {
'init_command': "SET sql_mode='STRICT_ALL_TABLES'",
}


SILENCED_SYSTEM_CHECKS = [
'pootle.W004', # Pootle requires a working mail server
Expand Down

0 comments on commit f48100f

Please sign in to comment.