mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
ignore deleted ... too much trouble
This commit is contained in:
parent
16e69d16b8
commit
bfd28ca9a9
2 changed files with 3 additions and 7 deletions
|
@ -32,7 +32,7 @@ class ImportScripts::Base
|
||||||
@categories_lookup = {}
|
@categories_lookup = {}
|
||||||
@existing_posts = {}
|
@existing_posts = {}
|
||||||
@topic_lookup = {}
|
@topic_lookup = {}
|
||||||
@site_settings_during_import
|
@site_settings_during_import = nil
|
||||||
@old_site_settings = {}
|
@old_site_settings = {}
|
||||||
@start_time = Time.now
|
@start_time = Time.now
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@ class ImportScripts::Lithium < ImportScripts::Base
|
||||||
SELECT id, subject, body, deleted, user_id,
|
SELECT id, subject, body, deleted, user_id,
|
||||||
post_date, views, node_id, unique_id
|
post_date, views, node_id, unique_id
|
||||||
FROM message2
|
FROM message2
|
||||||
WHERE id = root_id #{TEMP}
|
WHERE id = root_id #{TEMP} AND deleted = 0
|
||||||
ORDER BY node_id, id
|
ORDER BY node_id, id
|
||||||
LIMIT #{BATCH_SIZE}
|
LIMIT #{BATCH_SIZE}
|
||||||
OFFSET #{offset}
|
OFFSET #{offset}
|
||||||
|
@ -255,10 +255,6 @@ class ImportScripts::Lithium < ImportScripts::Base
|
||||||
custom_fields: {import_unique_id: topic["unique_id"]}
|
custom_fields: {import_unique_id: topic["unique_id"]}
|
||||||
}
|
}
|
||||||
|
|
||||||
if topic["deleted"] > 0
|
|
||||||
t["deleted_at"] = Time.now
|
|
||||||
end
|
|
||||||
|
|
||||||
t
|
t
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -275,7 +271,7 @@ class ImportScripts::Lithium < ImportScripts::Base
|
||||||
SELECT id, body, deleted, user_id,
|
SELECT id, body, deleted, user_id,
|
||||||
post_date, parent_id, root_id, node_id, unique_id
|
post_date, parent_id, root_id, node_id, unique_id
|
||||||
FROM message2
|
FROM message2
|
||||||
WHERE id <> root_id #{TEMP}
|
WHERE id <> root_id #{TEMP} AND deleted = 0
|
||||||
ORDER BY node_id, root_id, id
|
ORDER BY node_id, root_id, id
|
||||||
LIMIT #{BATCH_SIZE}
|
LIMIT #{BATCH_SIZE}
|
||||||
OFFSET #{offset}
|
OFFSET #{offset}
|
||||||
|
|
Loading…
Reference in a new issue