summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-04-27 15:38:50 -0400
committerAdam <Adam@anope.org>2012-04-27 15:38:50 -0400
commit5068483cb917ba1c8ed3a0d20f7bfcb996f0aa3e (patch)
treecf2bf4096b72f68b595a3bbe9d0e75d34ad2641d /data
parent83ee20fc2910e9ea0cac250e767d20f17576d98a (diff)
Add db_sql:prefix allow prefixing all anope tables similarly, and changed db_sql to update the databases incrementally instead of one big flush
Diffstat (limited to 'data')
-rw-r--r--data/chanstats.example.conf22
-rw-r--r--data/example.conf13
2 files changed, 11 insertions, 24 deletions
diff --git a/data/chanstats.example.conf b/data/chanstats.example.conf
index 2ada76b98..ab07b2713 100644
--- a/data/chanstats.example.conf
+++ b/data/chanstats.example.conf
@@ -8,17 +8,11 @@ module { name = "m_chanstats" }
chanstats
{
/*
- * WARNING: DO NOT USE THE SAME DATABASE AS db_mysql! db_mysql drops ALL tables in the db!
- * For this, we add a second mysql{ } block after the chanstats{ } configuration block
- * and give it another engine name, so m_mysql opens a second connection to the mysql server.
- * /
-
- /*
* The name of this engine.
- * This must match with the name in the mysql{ } block
+ * This must match with the name of a SQL engine block
*/
- engine = "mysql/chanstats"
+ engine = "mysql/main"
smileyshappy = ":) :-) ;) :D :-D"
@@ -33,18 +27,6 @@ chanstats
CSDefChanstats = 1
}
-mysql
-{
- name = "mysql/chanstats"
- database = "anope"
- server = "127.0.0.1"
- username = "anope"
- password = "anope"
- port = 3306
-}
-
-
-
module { name = "cs_set_chanstats" }
command { service = "ChanServ"; name = "SET CHANSTATS"; command = "chanserv/set/chanstats"; }
diff --git a/data/example.conf b/data/example.conf
index e27067e9a..3b8fc6628 100644
--- a/data/example.conf
+++ b/data/example.conf
@@ -1091,11 +1091,10 @@ db_flatfile
* db_sql
*
* This module allows saving and loading databases using one of the SQL engines.
- * This module does not use any real time reading or writing to SQL. Changes to
- * the SQL tables not done by Anope will have no effect and will be overwritten.
+ * This module loads the databases once on startup, then incrementally updates
+ * objects in the database as they are changed within Anope in real time. Changes
+ * to the SQL tables not done by Anope will have no effect and will be overwritten.
*
- * WARNING: This module will delete every table in the database it uses. Be sure
- * to put Anope in its own separate database.
*/
#module { name = "db_sql" }
@@ -1116,6 +1115,12 @@ db_sql
* For MySQL, this should probably be mysql/main.
*/
engine = "sqlite/main"
+
+ /*
+ * An optional prefix to prepended to the name of each created table.
+ * Do not use the same prefix for other programs.
+ */
+ #prefix = "anope_db_"
}
/*