diff options
author | Kim Alvefur <zash@zash.se> | 2017-04-08 16:33:42 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-04-08 16:33:42 +0200 |
commit | 1146267e9ca89172a39b1e955fcf9209f500ecff (patch) | |
tree | d905390ef886fd85a1cdc1443611ab07eaf784ea /tools/migration/migrator/prosody_sql.lua | |
parent | f345e640e57e716ccfd94c3eec2a77670e932936 (diff) | |
download | prosody-1146267e9ca89172a39b1e955fcf9209f500ecff.tar.gz prosody-1146267e9ca89172a39b1e955fcf9209f500ecff.zip |
migration/prosody_sql: Commit transaction when all items have been processed
Diffstat (limited to 'tools/migration/migrator/prosody_sql.lua')
-rw-r--r-- | tools/migration/migrator/prosody_sql.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/migration/migrator/prosody_sql.lua b/tools/migration/migrator/prosody_sql.lua index 2dd07bdc..642b74c2 100644 --- a/tools/migration/migrator/prosody_sql.lua +++ b/tools/migration/migrator/prosody_sql.lua @@ -161,7 +161,7 @@ local function writer(output, iter) local insert_sql = "INSERT INTO `prosody` (`host`,`user`,`store`,`key`,`type`,`value`) VALUES (?,?,?,?,?,?)"; return function(item) - if not item then return end -- end of input + if not item then assert(engine.conn:commit()) return end -- end of input local host = item.host or ""; local user = item.user or ""; for store, data in pairs(item.stores) do |