aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG.md8
-rw-r--r--activerecord/lib/active_record/tasks/database_tasks.rb2
2 files changed, 8 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 72b770e2d5..28441e598e 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,11 @@
+* `db:schema:load` and `db:structure:load` no longer purge the database
+ before loading the schema. This is left for the user to do.
+ `db:test:prepare` will still purge the database.
+
+ Closes #17945.
+
+ *Yves Senn*
+
* Fix undesirable RangeError by Type::Integer. Add Type::UnsignedInteger.
*Ryuta Kamizono*
diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb
index 1228de2bfd..6ed610e5f0 100644
--- a/activerecord/lib/active_record/tasks/database_tasks.rb
+++ b/activerecord/lib/active_record/tasks/database_tasks.rb
@@ -214,12 +214,10 @@ module ActiveRecord
case format
when :ruby
check_schema_file(file)
- purge(configuration)
ActiveRecord::Base.establish_connection(configuration)
load(file)
when :sql
check_schema_file(file)
- purge(configuration)
structure_load(configuration, file)
else
raise ArgumentError, "unknown format #{format.inspect}"