From 1a07b66620e8e520feb70e0c8a727aafbc822e7d Mon Sep 17 00:00:00 2001 From: saint Date: Sat, 29 Jun 2024 00:42:23 +1000 Subject: [PATCH] v0.21.2 Wipe URL table for now --- gossamer_forums.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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,