diff --git a/conf/jmc.conf b/conf/jmc.conf index 4e84aea..be4d26b 100644 --- a/conf/jmc.conf +++ b/conf/jmc.conf @@ -7,14 +7,18 @@ service_jid: jmc.localhost language: en [db] -#type: mysql +#SQLite config type: sqlite -#host: root@localhost host: name: /var/spool/jabber/jmc.db -#url: %(type)%(host)%(name)?debug=1&debugThreading=1 +#Mysql config +#type: mysql +#host: root:pass@localhost +#name: /jmc +#db_url: %(type)s://%(host)s%(name)s?debug=1&debugThreading=1 db_url: %(type)s://%(host)s%(name)s + [component] pid_file: /var/run/jabber/jmc.pid #motd: "Message of the day" diff --git a/src/jmc/model/account.py b/src/jmc/model/account.py index 9545073..d9ff87c 100644 --- a/src/jmc/model/account.py +++ b/src/jmc/model/account.py @@ -157,8 +157,9 @@ class MailAccount(PresenceAccount): password = StringCol(default=None) host = StringCol(default="localhost") port = IntCol(default=110) - ssl = BoolCol(default=False) - interval = IntCol(default=5) + # explicitly set dbName to avoid MySQL reserved words + ssl = BoolCol(default=False, dbName="_ssl") + interval = IntCol(default=5, dbName="_interval") store_password = BoolCol(default=True) live_email_only = BoolCol(default=False)