v0.48.1 Further attempts to address MariaDB challenges and make things as foolproof as possible.

This commit is contained in:
David Sainty 2024-08-18 19:16:03 +10:00
parent b0f300bf8e
commit 1d442ece31

View File

@ -37,10 +37,10 @@ class GossamerForumsCleaner
topic = Topic.find_by(id: field.topic_id) topic = Topic.find_by(id: field.topic_id)
if topic if topic
puts "Deleting topic #{topic.title} (ID: #{topic.id})" puts "Deleting topic #{topic.title} (ID: #{topic.id})"
topic.posts.each do |post| # topic.posts.each do |post|
puts "Deleting post #{post.id} in topic #{topic.id}" # puts "Deleting post #{post.id} in topic #{topic.id}"
post.destroy # post.destroy
end # end
topic.destroy topic.destroy
end end
end end
@ -77,7 +77,7 @@ class GossamerForumsCleaner
def perform_cleanup def perform_cleanup
puts "Cleanup beginning!" puts "Cleanup beginning!"
# cleanup_messages # cleanup_messages
cleanup_posts # cleanup_posts
cleanup_topics cleanup_topics
# cleanup_categories # cleanup_categories
# cleanup_users # cleanup_users