Replace oursql with PyMySQL

Since this is prefered on toolsforge and works out of the box after
installing via pip, replace oursql which caused some problems.
Especially oursql was not able to connect to db via ssh tunnel.

Related Task: [FS#144](https://fs.golderweb.de/index.php?do=details&task_id=144)
This commit is contained in:
2017-08-21 13:55:33 +02:00
parent 4a6855cf7b
commit 30de2a2e12

View File

@@ -46,12 +46,13 @@ import sqlalchemy.types as types
Base = declarative_base()
url = URL( "mysql+oursql",
url = URL( "mysql+pymysql",
username=config.db_username,
password=config.db_password,
host=config.db_hostname,
port=config.db_port,
database=config.db_username + jogobot.config['db_suffix'] )
engine = create_engine(url, echo=True)