diff --git a/Rakefile b/Rakefile index 5d4cd585..0b13d449 100644 --- a/Rakefile +++ b/Rakefile @@ -1,10 +1,11 @@ namespace :db do env = ENV["RAILS_ENV"] - fail "Cannot run rake db:create in production." if env == 'production' - desc "Create and migrate the #{env} database" - task :create do - sh "createdb travis_#{env}" rescue nil - sh "psql -q travis_#{env} < #{Gem.loaded_specs['travis-migrations'].full_gem_path}/db/structure.sql" + if env != 'production' + desc "Create and migrate the #{env} database" + task :create do + sh "createdb travis_#{env}" rescue nil + sh "psql -q travis_#{env} < #{Gem.loaded_specs['travis-migrations'].full_gem_path}/db/structure.sql" + end end end