From 91e4af0d3dff8df6cdeac1a4e5a3b2b9a6b2db03 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 12 Jul 2016 16:26:21 -0400 Subject: [PATCH] FIX: restore of a backup from an older Discourse version can create new tables in the wrong schema, leading to UndefinedTable errors --- lib/backup_restore/restorer.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/backup_restore/restorer.rb b/lib/backup_restore/restorer.rb index 3b843998a..2ecccc1e1 100644 --- a/lib/backup_restore/restorer.rb +++ b/lib/backup_restore/restorer.rb @@ -256,6 +256,7 @@ module BackupRestore log "Migrating the database..." Discourse::Application.load_tasks ENV["VERSION"] = @current_version.to_s + User.exec_sql("SET search_path = public, pg_catalog;") Rake::Task["db:migrate"].invoke end