Mercurial > kallithea
changeset 8562:f79dff927ab9
ini: change .ini template to include sqlalchemy.url examples for all database types
Rely less on users creating their initial .ini "correctly" with the right
database choice.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 08 Jun 2020 13:36:21 +0200 |
parents | 5fe492c6d7d7 |
children | 8cd0c12758e6 |
files | development.ini kallithea/lib/paster_commands/template.ini.mako |
diffstat | 2 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/development.ini Sun Mar 22 00:00:44 2020 +0100 +++ b/development.ini Mon Jun 08 13:36:21 2020 +0200 @@ -359,10 +359,9 @@ ## DB CONFIG ## ######################### -## SQLITE [default] sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60 - -## see sqlalchemy docs for other backends +#sqlalchemy.url = postgresql://user:pass@localhost/kallithea +#sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8 sqlalchemy.pool_recycle = 3600
--- a/kallithea/lib/paster_commands/template.ini.mako Sun Mar 22 00:00:44 2020 +0100 +++ b/kallithea/lib/paster_commands/template.ini.mako Mon Jun 08 13:36:21 2020 +0200 @@ -453,19 +453,20 @@ <%text>##</%text>####################### %if database_engine == 'sqlite': -<%text>##</%text> SQLITE [default] sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60 - -%elif database_engine == 'postgres': -<%text>##</%text> POSTGRESQL +%else: +#sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60 +%endif +%if database_engine == 'postgres': sqlalchemy.url = postgresql://user:pass@localhost/kallithea - -%elif database_engine == 'mysql': -<%text>##</%text> MySQL +%else: +#sqlalchemy.url = postgresql://user:pass@localhost/kallithea +%endif +%if database_engine == 'mysql': sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8 - +%else: +#sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8 %endif -<%text>##</%text> see sqlalchemy docs for other backends sqlalchemy.pool_recycle = 3600