Changeset

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
parents 4315:51706d2b9f77
children 4318:44b131d7041b
files plugins/mod_storage_sql.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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("`", "\"");