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 | 699dab7c6d9eec4565b11f76d1e27d17321176df (patch) | |
tree | d905390ef886fd85a1cdc1443611ab07eaf784ea /tools/migration | |
parent | 6b3a33a0835f774ab7e0f021d885b47b7631b7c4 (diff) | |
download | prosody-699dab7c6d9eec4565b11f76d1e27d17321176df.tar.gz prosody-699dab7c6d9eec4565b11f76d1e27d17321176df.zip |
migration/prosody_sql: Commit transaction when all items have been processed
Diffstat (limited to 'tools/migration')
-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 |