aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorBogdan <bogdanvlviv@gmail.com>2019-03-05 00:57:38 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2019-03-04 14:57:38 -0800
commita8c0ebccbdbf4e2ccbacbf94cba6cf24699af190 (patch)
tree0767c1a1138c4a670384fc8bc6a1e3ac7b23e879 /activerecord/CHANGELOG.md
parent076e8eddf4766a27a62fd0ae087c6c08501ddc42 (diff)
downloadrails-a8c0ebccbdbf4e2ccbacbf94cba6cf24699af190.tar.gz
rails-a8c0ebccbdbf4e2ccbacbf94cba6cf24699af190.tar.bz2
rails-a8c0ebccbdbf4e2ccbacbf94cba6cf24699af190.zip
Allow `truncate` for SQLite3 adapter and add `rails db:seed:replant` (#34779)
* Add `ActiveRecord::Base.connection.truncate` for SQLite3 adapter. SQLite doesn't support `TRUNCATE TABLE`, but SQLite3 adapter can support `ActiveRecord::Base.connection.truncate` by using `DELETE FROM`. `DELETE` without `WHERE` uses "The Truncate Optimization", see https://www.sqlite.org/lang_delete.html. * Add `rails db:seed:replant` that truncates database tables and loads the seeds Closes #34765
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 979b48c654..04449a3ebc 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,12 @@
+* Add `rails db:seed:replant` that truncates tables of each database
+ for current environment and loads the seeds.
+
+ *bogdanvlviv*, *DHH*
+
+* Add `ActiveRecord::Base.connection.truncate` for SQLite3 adapter.
+
+ *bogdanvlviv*
+
* Deprecate mismatched collation comparison for uniqueness validator.
Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1.