From 8d283e78e7780d0e78f2b403bc4e0c520fec6605 Mon Sep 17 00:00:00 2001 From: Miro Michalicka Date: Sat, 31 Mar 2018 17:53:40 +0200 Subject: [PATCH] Fix broken queries in Drupal 6 migration. --- script/import_scripts/drupal-6.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/script/import_scripts/drupal-6.rb b/script/import_scripts/drupal-6.rb index 018a1fba904..9b7b1f26288 100644 --- a/script/import_scripts/drupal-6.rb +++ b/script/import_scripts/drupal-6.rb @@ -115,8 +115,8 @@ class ImportScripts::Drupal < ImportScripts::Base FROM node n LEFT JOIN forum f ON f.vid=n.vid LEFT JOIN node_revisions nr ON nr.vid=n.vid - WHERE node.type = 'forum' - AND node.status = 1 + WHERE n.type = 'forum' + AND n.status = 1 LIMIT #{batch_size} OFFSET #{offset}; ", cache_rows: false) @@ -152,9 +152,9 @@ class ImportScripts::Drupal < ImportScripts::Base SELECT COUNT(*) count FROM comments c LEFT JOIN node n ON n.nid=c.nid - WHERE node.type IN #{node_types} - AND node.status = 1 - AND comments.status=0; + WHERE n.type IN #{node_types} + AND n.status = 1 + AND c.status=0; ").first['count'] batch_size = 1000