Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

only dump domain data on a migrate:reset

  • Loading branch information...
commit 5bc1c9893824f8d333d535549e335a79ac47cd07 1 parent e4f7af3
Nick Gauthier authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/tasks/rails_structure_loading.rb
View
7 lib/tasks/rails_structure_loading.rb
@@ -67,9 +67,14 @@ def domain
desc "Dump the structure after a migration"
task :migrate do
Rake::Task["db:structure:dump"].invoke if ActiveRecord::Base.schema_format == :sql
- if RAILS_ENV == "test"
+ end
+
+ namespace :migrate do
+ desc "Dump the domain when a migrate-reset is run"
+ task :reset do
Rake::Task["db:domain:dump"].invoke if ActiveRecord::Base.schema_format == :sql
end
end
+
end
Please sign in to comment.
Something went wrong with that request. Please try again.