Software /
code /
prosody
Diff
tools/migration/migrator/prosody_sql.lua @ 8066:5eec340c75fb
migration/prosody_sql: Commit transaction when all items have been processed
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 08 Apr 2017 16:33:42 +0200 |
parent | 8064:ffb36d1ae23b |
child | 8068:5abb6bc45edd |
child | 8073:7361412a9664 |
line wrap: on
line diff
--- a/tools/migration/migrator/prosody_sql.lua Fri Apr 07 13:17:00 2017 +0200 +++ b/tools/migration/migrator/prosody_sql.lua Sat Apr 08 16:33:42 2017 +0200 @@ -161,7 +161,7 @@ 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