v0.3 Ready for actual soft-delete run on live-prod

This commit is contained in:
David Sainty 2024-09-16 14:23:29 +10:00
parent 0363787283
commit 15c1486e7c

View File

@ -1,7 +1,7 @@
# Federated Computer, Inc. # Federated Computer, Inc.
# David Sainty <saint@federated.computer> 2024 A.D. # David Sainty <saint@federated.computer> 2024 A.D.
# Gossamer Threads to Discourse -- Soft Deletion of Marked-As-Deleted Posts # Gossamer Threads to Discourse -- Soft Deletion of Marked-As-Deleted Posts
# v0.2 Address where due to import issues there are some stray PostCustomField records for Posts that do not exist. # v0.3 Ready for actual soft-delete run on live-prod
require 'mysql2' require 'mysql2'
require 'active_record' require 'active_record'
@ -60,7 +60,7 @@ class GossamerForumsSoftDelDeletedPosts < ImportScripts::Base
## post.deleted_by_id = deleted_by_id ## post.deleted_by_id = deleted_by_id
## post.save ## post.save
puts "... actual deleted_at step" puts "... actual deleted_at step"
### post.update(deleted_at: Time.now, deleted_by_id: deleted_by_id) post.update(deleted_at: Time.now, deleted_by_id: deleted_by_id)
else else
puts "SoftDelDeletedPosts: Post with id: #{post.id} is already soft deleted." puts "SoftDelDeletedPosts: Post with id: #{post.id} is already soft deleted."
end end