mod_storage_sql2: Don't upgrade tables without admin intervention
authorMatthew Wild <mwild1@gmail.com>
Tue, 7 Jul 2015 16:42:29 +0000 (17:42 +0100)
committerMatthew Wild <mwild1@gmail.com>
Tue, 7 Jul 2015 16:42:29 +0000 (17:42 +0100)
plugins/mod_storage_sql2.lua

index b040cb055c02faf3af3d9fa5e91f1c41200e2101..a9d822145d6bfbf758aa762dd3623c09fe806d4e 100644 (file)
@@ -396,8 +396,8 @@ function module.load()
                        -- FIXME: we should check in information_schema, etc.
                        create_table();
                        -- Check whether the table needs upgrading
-                       if not upgrade_table(params, true) then
-                               module:log("error", "Old database format detected, and upgrade failed");
+                       if upgrade_table(params, false) then
+                               module:log("error", "Old database format detected. Please run: prosodyctl mod_%s upgrade", module.name);
                                return false, "database upgrade needed";
                        end
                end