1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/active_record/railties
Bogdan a8c0ebccbd 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
2019-03-04 14:57:38 -08:00
..
collection_cache_association_loading.rb Speed up partial rendering by caching "variable" calculation 2019-02-05 15:24:21 -08:00
console_sandbox.rb
controller_runtime.rb Rails 6 requires Ruby 2.3+ 2018-02-17 10:03:37 -08:00
databases.rake Allow truncate for SQLite3 adapter and add rails db:seed:replant (#34779) 2019-03-04 14:57:38 -08:00