move charset to the beginning of the conn string

Otherwise it is not apparent that there is a hard-coded parameter. The
previous incarnation had a bug because a conditional template argument
was not rendered and charset was appended to the database name as a
result:

panko&charset=utf8
This commit is contained in:
Dmitrii Shcherbakov 2017-08-02 01:12:45 +03:00
parent ce5a726f36
commit 4416e8d3ce
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ auth_mode = keystone
{% if shared_db.uri -%}
[database]
connection = mysql+pymysql://{{ shared_db.username }}:{{ shared_db.password }}@{{ shared_db.host }}/{{ shared_db.database }}{% if database_ssl_ca %}?ssl_ca={{ database_ssl_ca }}{% if database_ssl_cert %}&ssl_cert={{ database_ssl_cert }}&ssl_key={{ database_ssl_key }}{% endif %}{% endif %}&charset=utf8
connection = mysql+pymysql://{{ shared_db.username }}:{{ shared_db.password }}@{{ shared_db.host }}/{{ shared_db.database }}?charset=utf8{% if database_ssl_ca %}&ssl_ca={{ database_ssl_ca }}{% if database_ssl_cert %}&ssl_cert={{ database_ssl_cert }}&ssl_key={{ database_ssl_key }}{% endif %}{% endif %}
{%- endif %}
{% include "parts/section-keystone-authtoken" %}