mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
fix vanilla bulk importer resume categories and private topics
This commit is contained in:
parent
80e85e0d8f
commit
d7bd69583f
1 changed files with 3 additions and 0 deletions
|
@ -285,6 +285,7 @@ class BulkImport::Vanilla < BulkImport::Base
|
||||||
|
|
||||||
# Depth = 2
|
# Depth = 2
|
||||||
create_categories(top_level_categories) do |category|
|
create_categories(top_level_categories) do |category|
|
||||||
|
next if category_id_from_imported_id(category['CategoryID'])
|
||||||
{
|
{
|
||||||
imported_id: category['CategoryID'],
|
imported_id: category['CategoryID'],
|
||||||
name: CGI.unescapeHTML(category['Name']),
|
name: CGI.unescapeHTML(category['Name']),
|
||||||
|
@ -299,6 +300,7 @@ class BulkImport::Vanilla < BulkImport::Base
|
||||||
|
|
||||||
# Depth = 3
|
# Depth = 3
|
||||||
create_categories(subcategories) do |category|
|
create_categories(subcategories) do |category|
|
||||||
|
next if category_id_from_imported_id(category['CategoryID'])
|
||||||
{
|
{
|
||||||
imported_id: category['CategoryID'],
|
imported_id: category['CategoryID'],
|
||||||
parent_category_id: category_id_from_imported_id(category['ParentCategoryID']),
|
parent_category_id: category_id_from_imported_id(category['ParentCategoryID']),
|
||||||
|
@ -456,6 +458,7 @@ class BulkImport::Vanilla < BulkImport::Base
|
||||||
SELECT ConversationID, UserID
|
SELECT ConversationID, UserID
|
||||||
FROM #{TABLE_PREFIX}UserConversation
|
FROM #{TABLE_PREFIX}UserConversation
|
||||||
WHERE Deleted = 0
|
WHERE Deleted = 0
|
||||||
|
AND ConversationID > #{@last_imported_private_topic_id - PRIVATE_OFFSET}
|
||||||
ORDER BY ConversationID ASC"
|
ORDER BY ConversationID ASC"
|
||||||
|
|
||||||
added = 0
|
added = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue