From 52a8f00d82c1b6b2a3dcd7ab66c77a2a7c683e26 Mon Sep 17 00:00:00 2001 From: Wojciech Kocjan Date: Wed, 10 Apr 2013 13:26:55 +0200 Subject: [PATCH] Prevent crashes during migration in certain PostgreSQL configurations --- Rakefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Rakefile b/Rakefile index 4a791a9b77d..179ba560eb2 100644 --- a/Rakefile +++ b/Rakefile @@ -5,3 +5,8 @@ require File.expand_path('../config/application', __FILE__) Discourse::Application.load_tasks + +# this prevents crashes when migrating a database in production in certain +# PostgreSQL configuations when trying to create structure.sql +Rake::Task["db:structure:dump"].clear if Rails.env.production? +