aboutsummaryrefslogtreecommitdiffstats
path: root/tools/migration/migrator/prosody_sql.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-04-05 13:26:43 +0100
committerMatthew Wild <mwild1@gmail.com>2011-04-05 13:26:43 +0100
commit1cfb734e0ecde10fcd5f457c1394ecb3b7a28e2a (patch)
tree35cdd4996c2ba4c67a4805bd01e3830d1dc171f5 /tools/migration/migrator/prosody_sql.lua
parent272ca5fce11d42d9cd3b50c0f3baa03729583443 (diff)
parentca74173a8221e9cd93db30c7bb89c8b181f8b60b (diff)
downloadprosody-1cfb734e0ecde10fcd5f457c1394ecb3b7a28e2a.tar.gz
prosody-1cfb734e0ecde10fcd5f457c1394ecb3b7a28e2a.zip
Merge 0.8->trunk
Diffstat (limited to 'tools/migration/migrator/prosody_sql.lua')
-rw-r--r--tools/migration/migrator/prosody_sql.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/migration/migrator/prosody_sql.lua b/tools/migration/migrator/prosody_sql.lua
index 3a9172ff..b1f836be 100644
--- a/tools/migration/migrator/prosody_sql.lua
+++ b/tools/migration/migrator/prosody_sql.lua
@@ -1,6 +1,6 @@
local assert = assert;
-local DBI = require "DBI";
+local have_DBI, DBI = pcall(require,"DBI");
local print = print;
local type = type;
local next = next;
@@ -11,6 +11,10 @@ local mtools = require "migrator.mtools";
local tostring = tostring;
local tonumber = tonumber;
+if not have_DBI then
+ error("LuaDBI (required for SQL support) was not found, please see http://prosody.im/doc/depends#luadbi", 0);
+end
+
module "prosody_sql"
local function create_table(connection, params)