Diff

plugins/mod_storage_sql.lua @ 4317:5b0fcc5cdd4d

mod_storage_sql: Add sql_manage_tables to disable table creation/updating.
author Matthew Wild <mwild1@gmail.com>
date Sat, 11 Jun 2011 02:15:38 +0100
parent 4309:7ad81d81f5ec
child 4318:44b131d7041b
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua	Tue Jun 07 01:29:02 2011 +0100
+++ b/plugins/mod_storage_sql.lua	Sat Jun 11 02:15:38 2011 +0100
@@ -65,6 +65,9 @@
 end
 
 local function create_table()
+	if not module:get_option("sql_manage_tables", true) then
+		return;
+	end
 	local create_sql = "CREATE TABLE `prosody` (`host` TEXT, `user` TEXT, `store` TEXT, `key` TEXT, `type` TEXT, `value` TEXT);";
 	if params.driver == "PostgreSQL" then
 		create_sql = create_sql:gsub("`", "\"");