diff --git a/gossamer_forums.rb b/gossamer_forums.rb index 6b8fed4..0c198bd 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1,5 +1,5 @@ # gossamer threads migration-import code -# v0.21.1 +# v0.21.2 require 'mysql2' require 'open-uri' @@ -59,9 +59,12 @@ class GossamerForumsImporter < ImportScripts::Base real_name TEXT ); SQL -# @db.execute <<-SQL -# DROP TABLE IF EXISTS url_map; -# SQL + + # ONLY when we need to clear the url_map e.g. if reimporting topics-posts from scratch + @db.execute <<-SQL + DROP TABLE IF EXISTS url_map; + SQL + @db.execute <<-SQL CREATE TABLE IF NOT EXISTS url_map ( old_post_id INTEGER PRIMARY KEY,