Software /
code /
prosody
Comparison
plugins/mod_storage_sql2.lua @ 6757:fc9c1a566a19
mod_storage_sql2: Don't upgrade tables without admin intervention
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 07 Jul 2015 17:42:29 +0100 |
parent | 6756:2e75b94e3a1e |
child | 6761:b20efae224c9 |
comparison
equal
deleted
inserted
replaced
6756:2e75b94e3a1e | 6757:fc9c1a566a19 |
---|---|
394 if module:get_option("sql_manage_tables", true) then | 394 if module:get_option("sql_manage_tables", true) then |
395 -- Automatically create table, ignore failure (table probably already exists) | 395 -- Automatically create table, ignore failure (table probably already exists) |
396 -- FIXME: we should check in information_schema, etc. | 396 -- FIXME: we should check in information_schema, etc. |
397 create_table(); | 397 create_table(); |
398 -- Check whether the table needs upgrading | 398 -- Check whether the table needs upgrading |
399 if not upgrade_table(params, true) then | 399 if upgrade_table(params, false) then |
400 module:log("error", "Old database format detected, and upgrade failed"); | 400 module:log("error", "Old database format detected. Please run: prosodyctl mod_%s upgrade", module.name); |
401 return false, "database upgrade needed"; | 401 return false, "database upgrade needed"; |
402 end | 402 end |
403 end | 403 end |
404 end); | 404 end); |
405 | 405 |