-
Notifications
You must be signed in to change notification settings - Fork 566
Closed
Description
Here are some notes I made while working on 4.2.
def truncate(table_name, name = nil)
raise NotImplementedError
end
- Add a truncate method to the connection.
- The
db:schema:load
anddb:structure:load
no longer purge the database before loading the schema. This is left for the user to do.db:test:prepare
will still purge the database. Closes #17945. - Bring back
db:test:prepare
to synchronize the test database schema. Manual synchronization usingbin/rake db:test:prepare
is required when a migration is rolled-back, edited and reapplied.ActiveRecord::Base.maintain_test_schema
now usesdb: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 is synchronized.Fixes #17171, #15787. - Add
bin/rake db:purge
task to empty the current database. - No verbose backtrace by
db:drop
when database does not exist. - Schema loading rake tasks (like
db:schema:load
anddb:setup
) maintain the database connection to the current environment.