Permalink
Browse files

Remove deprecated db:test:clone* tasks

  • Loading branch information...
rafaelfranca committed Jan 4, 2017
1 parent 9d40d9b commit e229580b4b1d4001b5a9450e0a50e0c33a779fe1
Showing with 4 additions and 24 deletions.
  1. +4 −0 activerecord/CHANGELOG.md
  2. +0 −24 activerecord/lib/active_record/railties/databases.rake
@@ -1,3 +1,7 @@
* Remove deprecated tasks: `db:test:clone`, `db:test:clone_schema`, `db:test:clone_structure`.
*Rafel Mendonça França*
* Compare deserialized values for `PostgreSQL::OID::Hstore` types when
calling `ActiveRecord::Dirty#changed_in_place?`
@@ -309,14 +309,6 @@ db_namespace = namespace :db do
end
namespace :test do
task :deprecated do
Rake.application.top_level_tasks.grep(/^db:test:/).each do |task|
$stderr.puts "WARNING: #{task} is deprecated. The Rails test helper now maintains " \
"your test schema automatically, see the release notes for details."
end
end
# desc "Recreate the test database from the current schema"
task load: %w(db:test:purge) do
case ActiveRecord::Base.schema_format
@@ -345,22 +337,6 @@ db_namespace = namespace :db do
ActiveRecord::Tasks::DatabaseTasks.load_schema ActiveRecord::Base.configurations["test"], :sql, ENV["SCHEMA"]
end
# desc "Recreate the test database from a fresh schema"
task clone: %w(db:test:deprecated environment) do
case ActiveRecord::Base.schema_format
when :ruby
db_namespace["test:clone_schema"].invoke
when :sql
db_namespace["test:clone_structure"].invoke
end
end
# desc "Recreate the test database from a fresh schema.rb file"
task clone_schema: %w(db:test:deprecated db:schema:dump db:test:load_schema)
# desc "Recreate the test database from a fresh structure.sql file"
task clone_structure: %w(db:test:deprecated db:structure:dump db:test:load_structure)
# desc "Empty the test database"
task purge: %w(environment load_config check_protected_environments) do
ActiveRecord::Tasks::DatabaseTasks.purge ActiveRecord::Base.configurations["test"]

0 comments on commit e229580

Please sign in to comment.