v0.48.1 Further attempts to address MariaDB challenges and make things as foolproof as possible.
This commit is contained in:
parent
b0f300bf8e
commit
1d442ece31
@ -37,10 +37,10 @@ class GossamerForumsCleaner
|
||||
topic = Topic.find_by(id: field.topic_id)
|
||||
if topic
|
||||
puts "Deleting topic #{topic.title} (ID: #{topic.id})"
|
||||
topic.posts.each do |post|
|
||||
puts "Deleting post #{post.id} in topic #{topic.id}"
|
||||
post.destroy
|
||||
end
|
||||
# topic.posts.each do |post|
|
||||
# puts "Deleting post #{post.id} in topic #{topic.id}"
|
||||
# post.destroy
|
||||
# end
|
||||
topic.destroy
|
||||
end
|
||||
end
|
||||
@ -77,7 +77,7 @@ class GossamerForumsCleaner
|
||||
def perform_cleanup
|
||||
puts "Cleanup beginning!"
|
||||
# cleanup_messages
|
||||
cleanup_posts
|
||||
# cleanup_posts
|
||||
cleanup_topics
|
||||
# cleanup_categories
|
||||
# cleanup_users
|
||||
|
Loading…
Reference in New Issue
Block a user