# HG changeset patch # User Kim Alvefur # Date 1491662022 -7200 # Node ID 5eec340c75fb52a6f7af6692e4ade224a923ac0f # Parent ffb36d1ae23b653f8d073da8bdf810ad8cfe5616 migration/prosody_sql: Commit transaction when all items have been processed diff -r ffb36d1ae23b -r 5eec340c75fb tools/migration/migrator/prosody_sql.lua --- 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