v0.39.5 Add SQLite table for tracking successful post importation; Split out user import into three separate callable methods; require sys/proctable

This commit is contained in:
David Sainty 2024-08-17 02:47:22 +10:00
parent 061aaba9fe
commit e5e6dff339

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 -- Migration-Import Script # Gossamer Threads to Discourse -- Migration-Import Script
# v0.39.4 Add SQLite table for tracking successful post importation; Split out user import into three separate callable methods; require sys/proctable # v0.39.5 Add SQLite table for tracking successful post importation; Split out user import into three separate callable methods; require sys/proctable
require 'mysql2' require 'mysql2'
require 'open-uri' require 'open-uri'
@ -1745,26 +1745,25 @@ class GossamerForumsImporter < ImportScripts::Base
puts "Starting Gossamer Forums import... #{timestamp}" puts "Starting Gossamer Forums import... #{timestamp}"
add_former_user # add_former_user
import_users # import_users
generate_user_id_mapping # generate_user_id_mapping
export_username_mapping_to_csv("/bitnami/discourse/sqlite/gossamer-migration-username-mapping#{timestamp}") # export_username_mapping_to_csv("/bitnami/discourse/sqlite/gossamer-migration-username-mapping#{timestamp}")
# set_user_bio_images ## set_user_bio_images
import_categories # import_categories
#### import_topics_and_posts_with_attachments
####### import_topics_and_posts_with_attachments
threaded_topic_import threaded_topic_import
# update_topic_stats update_topic_stats
# update_user_stats update_user_stats
# export_url_mapping_to_csv("/bitnami/discourse/sqlite/gossamer-migration-url-mapping#{timestamp}") export_url_mapping_to_csv("/bitnami/discourse/sqlite/gossamer-migration-url-mapping#{timestamp}")
# create_nginx_rewrite_rules("/bitnami/discourse/sqlite/gossamer-redirects#{timestamp}.conf") create_nginx_rewrite_rules("/bitnami/discourse/sqlite/gossamer-redirects#{timestamp}.conf")
# import_personal_messages import_personal_messages
puts "Gossamer Forums import complete! #{timestamp}" puts "Gossamer Forums import complete! #{timestamp}"
end end