diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-07-28 05:33:51 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-07-28 05:33:51 +0500 |
commit | 39e1b4b1df2c49739e89b80f4b4351a4e6b20f81 (patch) | |
tree | 83a5a4ea34dbbbc98b0465df685da31c94d63d07 /tools/ejabberdsql2prosody.lua | |
parent | 6ac4d843f0453b79529cb15656832579111dc53d (diff) | |
download | prosody-39e1b4b1df2c49739e89b80f4b4351a4e6b20f81.tar.gz prosody-39e1b4b1df2c49739e89b80f4b4351a4e6b20f81.zip |
ejabberdsql2prosody: Allow for multiple INSERTs to the same table
Diffstat (limited to 'tools/ejabberdsql2prosody.lua')
-rw-r--r-- | tools/ejabberdsql2prosody.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/ejabberdsql2prosody.lua b/tools/ejabberdsql2prosody.lua index b3077331..5b975269 100644 --- a/tools/ejabberdsql2prosody.lua +++ b/tools/ejabberdsql2prosody.lua @@ -136,7 +136,14 @@ local function readFile(filename) while true do local tname, tuples = readInsert(); if tname then - t[tname] = tuples; + if t[name] then + local t_name = t[name]; + for i=1,#tuples do + table.insert(t_name, tuples[i]); + end + else + t[tname] = tuples; + end elseif peek() == nil then break; end |