Software /
code /
prosody
Changeset
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 |
parents | 8064:ffb36d1ae23b |
children | 8067:91550b6f93d2 |
files | tools/migration/migrator/prosody_sql.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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