Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dax/jmc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rousselie <dax@happycoders.org>2007-09-28 22:47:00 +0400
committerDavid Rousselie <dax@happycoders.org>2007-09-28 22:47:00 +0400
commit23c84a338e7ebb6e7b3a959882ef838c7ba014d8 (patch)
treef5ac27add9f93cf79c5c03bde6c7af604be53dc4
parent53f0ae67f1bd351c834652d4a49f71c820e76f7e (diff)
MySQL support (rename columns names conflicting with MySQL reserved words)
darcs-hash:20070928184700-86b55-c9acce01326a0d0ae3c616d6e202ad9ebe6599ba.gz
-rw-r--r--conf/jmc.conf10
-rw-r--r--src/jmc/model/account.py5
2 files changed, 10 insertions, 5 deletions
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)