diff --git a/gossamer_forums.rb b/gossamer_forums.rb index a8b037a..7c35bb4 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1,7 +1,7 @@ # Federated Computer, Inc. # David Sainty 2024 A.D. # Gossamer Threads to Discourse -- Migration-Import Script -# v0.39.1 Add SQLite table for tracking successful post importation; Split out user import into three separate callable methods; require sys/proctable +# v0.39.2 Add SQLite table for tracking successful post importation; Split out user import into three separate callable methods; require sys/proctable require 'mysql2' require 'open-uri' @@ -152,7 +152,7 @@ class GossamerForumsImporter < ImportScripts::Base end def insert_username_mapping(old_username, new_username, email, real_name) - @db.execute "INSERT INTO username_map (old_username, new_username, email, real_name) VALUES (?, ?, ?, ?)", old_username, new_username, email, real_name + @db.execute "INSERT OR REPLACE INTO username_map (old_username, new_username, email, real_name) VALUES (?, ?, ?, ?)", old_username, new_username, email, real_name end # Define a method to export the username mapping table to a CSV file