diff --git a/script/import_scripts/base.rb b/script/import_scripts/base.rb index 262786151..093875493 100644 --- a/script/import_scripts/base.rb +++ b/script/import_scripts/base.rb @@ -32,7 +32,7 @@ class ImportScripts::Base @categories_lookup = {} @existing_posts = {} @topic_lookup = {} - @site_settings_during_import + @site_settings_during_import = nil @old_site_settings = {} @start_time = Time.now diff --git a/script/import_scripts/lithium.rb b/script/import_scripts/lithium.rb index c087dfe8c..6d10375ff 100644 --- a/script/import_scripts/lithium.rb +++ b/script/import_scripts/lithium.rb @@ -229,7 +229,7 @@ class ImportScripts::Lithium < ImportScripts::Base SELECT id, subject, body, deleted, user_id, post_date, views, node_id, unique_id FROM message2 - WHERE id = root_id #{TEMP} + WHERE id = root_id #{TEMP} AND deleted = 0 ORDER BY node_id, id LIMIT #{BATCH_SIZE} OFFSET #{offset} @@ -255,10 +255,6 @@ class ImportScripts::Lithium < ImportScripts::Base custom_fields: {import_unique_id: topic["unique_id"]} } - if topic["deleted"] > 0 - t["deleted_at"] = Time.now - end - t end end @@ -275,7 +271,7 @@ class ImportScripts::Lithium < ImportScripts::Base SELECT id, body, deleted, user_id, post_date, parent_id, root_id, node_id, unique_id FROM message2 - WHERE id <> root_id #{TEMP} + WHERE id <> root_id #{TEMP} AND deleted = 0 ORDER BY node_id, root_id, id LIMIT #{BATCH_SIZE} OFFSET #{offset}