A platform for community discussion. Free, open, simple.
DEV: Create missing user profiles in "import:ensure_consistency" rake task
Gerhard Schlagereabea3e8fd08
diff --git a/lib/tasks/import.rake b/lib/tasks/import.rakeindex e8f62e8f4c0..79eb54726d1 100644--- a/lib/tasks/import.rake+++ b/lib/tasks/import.rake@@ -11,6 +11,7 @@ task "import:ensure_consistency" => :environment doinsert_topic_viewsinsert_user_actionsinsert_user_options+ insert_user_profilesinsert_user_statsinsert_user_visitsinsert_draft_sequences@@ -198,6 +199,17 @@ def insert_user_optionsSQLend+def insert_user_profiles+ log "Inserting user profiles..."++ DB.exec <<-SQL+ INSERT INTO user_profiles (user_id)+ SELECT id+ FROM users+ ON CONFLICT DO NOTHING+ SQL+end+def insert_user_statslog "Inserting user stats..."