rails/activerecord/test/cases/tasks
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
..
database_tasks_test.rb Allow truncate for SQLite3 adapter and add rails db:seed:replant (#34779) 2019-03-04 14:57:38 -08:00
mysql_rake_test.rb assert_called_with should require args argument 2018-10-25 21:29:39 +03:00
postgresql_rake_test.rb Use -X when loading structure.sql via psql 2018-09-27 10:01:24 -03:00
sqlite_rake_test.rb Prevent leaking of user's DB credentials on rails db:create failure 2018-08-29 12:40:30 +03:00