modifica solo l’SQL nello script di importazione
SELECT p.post_id id,
t.thread_id topic_id,
#{@prefix_as_category ? "t.prefix_id" : "t.node_id"} category_id,
t.title title,
t.first_post_id first_post_id,
t.view_count,
p.user_id user_id,
p.message raw,
p.post_date created_at
FROM #{TABLE_PREFIX}post p,
#{TABLE_PREFIX}thread t
WHERE p.thread_id = t.thread_id
AND p.message_state = 'visible'
AND t.discussion_state = 'visible'
ORDER BY p.post_date
LIMIT #{BATCH_SIZE}" # needs OFFSET
aggiungi AND p.post_id = t.first_post_id alla clausola WHERE
Cambia
mapped[:user_id] = user_id_from_imported_user_id(m["user_id"]) || -1
in
mapped[:user_id] = xxx
dove xxx è l’ID utente di Discourse a cui vuoi assegnare gli argomenti.