diff options
author | Kim Alvefur <zash@zash.se> | 2017-02-02 20:49:09 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-02-02 20:49:09 +0100 |
commit | 0a385a3953bff3088fb3d4d53cf6a5a9b618f006 (patch) | |
tree | 5112717a057722f10d70b13097004eb77572fe54 /tools/migration/migrator/prosody_sql.lua | |
parent | f0918f4e1b59ca6f360a4b1ae2974a9c339e71a1 (diff) | |
download | prosody-0a385a3953bff3088fb3d4d53cf6a5a9b618f006.tar.gz prosody-0a385a3953bff3088fb3d4d53cf6a5a9b618f006.zip |
tools/migration/migrator/*: Remove use of module()
Diffstat (limited to 'tools/migration/migrator/prosody_sql.lua')
-rw-r--r-- | tools/migration/migrator/prosody_sql.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/migration/migrator/prosody_sql.lua b/tools/migration/migrator/prosody_sql.lua index 180ae910..0041ca9e 100644 --- a/tools/migration/migrator/prosody_sql.lua +++ b/tools/migration/migrator/prosody_sql.lua @@ -15,7 +15,6 @@ 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) local create_sql = "CREATE TABLE `prosody` (`host` TEXT, `user` TEXT, `store` TEXT, `key` TEXT, `type` TEXT, `value` TEXT);"; @@ -110,7 +109,7 @@ local function decode_user(item) return userdata; end -function reader(input) +local function reader(input) local dbh = assert(DBI.Connect( assert(input.driver, "no input.driver specified"), assert(input.database, "no input.database specified"), @@ -154,7 +153,7 @@ function reader(input) end; end -function writer(output, iter) +local function writer(output, iter) local dbh = assert(DBI.Connect( assert(output.driver, "no output.driver specified"), assert(output.database, "no output.database specified"), @@ -197,4 +196,7 @@ function writer(output, iter) end -return _M; +return { + reader = reader; + writer = writer; +} |