mirror of https://github.com/JohnHammond/CTFd.git
Changes the default charset for MySQL (#282)
This bug is actually quite sneaky and was breaking exportsselenium-screenshot-testing
parent
e732e90661
commit
34237e6292
|
@ -43,6 +43,10 @@ def create_app(config='CTFd.config.Config'):
|
|||
|
||||
# Creates database if the database database does not exist
|
||||
if not database_exists(url):
|
||||
if url.drivername.startswith('mysql'):
|
||||
url.query['charset'] = 'utf8mb4'
|
||||
create_database(url, encoding='utf8mb4')
|
||||
else:
|
||||
create_database(url)
|
||||
|
||||
# Register database
|
||||
|
|
Loading…
Reference in New Issue