aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2014-11-24 12:04:01 +0100
committerYves Senn <yves.senn@gmail.com>2014-11-25 18:17:01 +0100
commit5c4495538bb4e8808ce077f08ea6b809952daa44 (patch)
treeffbe61d499b774bc9c5cc939225a1f55564cdb99 /activerecord/CHANGELOG.md
parent9e9793b440c044b765f2d1f702feeb92aef2b139 (diff)
downloadrails-5c4495538bb4e8808ce077f08ea6b809952daa44.tar.gz
rails-5c4495538bb4e8808ce077f08ea6b809952daa44.tar.bz2
rails-5c4495538bb4e8808ce077f08ea6b809952daa44.zip
bring back `db:test:prepare`.
This reverts deprecations added in #13528. The task is brought back for two reasons: 1. Give plugins a way to hook into the test database initialization process 2. Give the user a way to force a test database synchronization While `test:prepare` is still a dependency of every test task, `db:test:prepare` no longer hooks into it. This means that `test:prepare` runs before the schema is synchronized. Plugins, which insert data can now hook into `db:test:prepare`. The automatic schema maintenance can't detect when a migration is rolled-back, modified and reapplied. In this case the user has to fall back to `db:test:prepare` to force the synchronization to happen.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 9130cfbe9e..2140b1ea83 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,18 @@
+* Bring back `db:test:prepare` to synchronize the test database schema.
+
+ Manual synchronization using `bin/rake db:test:prepare` is required
+ when a migration is rolled-back, edited and reapplied.
+
+ `ActiveRecord::Base.maintain_test_schema` now uses `db:test:prepare`
+ to synchronize the schema. Plugins can use this task as a hook to
+ provide custom behavior after the schema has been loaded.
+
+ NOTE: `test:prepare` runs before the schema was synchronized.
+
+ Fixes #17171, #15787.
+
+ *Yves Senn*
+
* Change `reflections` public api to return the keys as String objects.
Fixes #16928.