From d7bd69583f05fa0d490b29167441c0e0c3667fe2 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Thu, 1 Mar 2018 15:29:38 -0500 Subject: [PATCH] fix vanilla bulk importer resume categories and private topics --- script/bulk_import/vanilla.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script/bulk_import/vanilla.rb b/script/bulk_import/vanilla.rb index 37b6acf231e..771a3ef67bb 100644 --- a/script/bulk_import/vanilla.rb +++ b/script/bulk_import/vanilla.rb @@ -285,6 +285,7 @@ class BulkImport::Vanilla < BulkImport::Base # Depth = 2 create_categories(top_level_categories) do |category| + next if category_id_from_imported_id(category['CategoryID']) { imported_id: category['CategoryID'], name: CGI.unescapeHTML(category['Name']), @@ -299,6 +300,7 @@ class BulkImport::Vanilla < BulkImport::Base # Depth = 3 create_categories(subcategories) do |category| + next if category_id_from_imported_id(category['CategoryID']) { imported_id: category['CategoryID'], parent_category_id: category_id_from_imported_id(category['ParentCategoryID']), @@ -456,6 +458,7 @@ class BulkImport::Vanilla < BulkImport::Base SELECT ConversationID, UserID FROM #{TABLE_PREFIX}UserConversation WHERE Deleted = 0 + AND ConversationID > #{@last_imported_private_topic_id - PRIVATE_OFFSET} ORDER BY ConversationID ASC" added = 0