diff options
author | Bogdan <bogdanvlviv@gmail.com> | 2019-03-05 00:57:38 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2019-03-04 14:57:38 -0800 |
commit | a8c0ebccbdbf4e2ccbacbf94cba6cf24699af190 (patch) | |
tree | 0767c1a1138c4a670384fc8bc6a1e3ac7b23e879 /guides/.document | |
parent | 076e8eddf4766a27a62fd0ae087c6c08501ddc42 (diff) | |
download | rails-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 'guides/.document')
0 files changed, 0 insertions, 0 deletions