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 20:27:36 +10:00
parent ad7a5f945c
commit f3c91267af

View File

@ -62,33 +62,33 @@ class GossamerForumsImporter < ImportScripts::Base
@db = SQLite3::Database.new '/bitnami/discourse/sqlite/id_name_url_map.db' @db = SQLite3::Database.new '/bitnami/discourse/sqlite/id_name_url_map.db'
###### ONLY when we need to clear the url_map and topic_import_status .... e.g. if reimporting topics-posts from scratch ###### ONLY when we need to clear the url_map and topic_import_status .... e.g. if reimporting topics-posts from scratch
@db.execute <<-SQL # @db.execute <<-SQL
DROP TABLE IF EXISTS url_map; # DROP TABLE IF EXISTS url_map;
SQL # SQL
@db.execute <<-SQL # @db.execute <<-SQL
DROP TABLE IF EXISTS topic_last_post_time; # DROP TABLE IF EXISTS topic_last_post_time;
SQL # SQL
@db.execute <<-SQL # @db.execute <<-SQL
DROP TABLE IF EXISTS topic_post_count; # DROP TABLE IF EXISTS topic_post_count;
SQL # SQL
@db.execute <<-SQL # @db.execute <<-SQL
DROP TABLE IF EXISTS user_topic_count; # DROP TABLE IF EXISTS user_topic_count;
SQL # SQL
@db.execute <<-SQL # @db.execute <<-SQL
DROP TABLE IF EXISTS user_post_count; # DROP TABLE IF EXISTS user_post_count;
SQL # SQL
@db.execute <<-SQL # @db.execute <<-SQL
DROP TABLE IF EXISTS topic_last_post_user; # DROP TABLE IF EXISTS topic_last_post_user;
SQL # SQL
@db.execute <<-SQL # @db.execute <<-SQL
DROP TABLE IF EXISTS topic_post_numbers; # DROP TABLE IF EXISTS topic_post_numbers;
SQL # SQL
@db.execute <<-SQL # @db.execute <<-SQL
DROP TABLE IF EXISTS highest_processed_post_id; # DROP TABLE IF EXISTS highest_processed_post_id;
SQL # SQL
@db.execute <<-SQL # @db.execute <<-SQL
DROP TABLE IF EXISTS topic_import_status; # DROP TABLE IF EXISTS topic_import_status;
SQL # SQL
####### #######
# USER IMPORT - map of old to new user ids, used for topic-post import. # USER IMPORT - map of old to new user ids, used for topic-post import.