January 13, 2021
This blog is part of our Rails 6.1 series.
Rails 6.1 provides additional tasks to work with a specific database when working in a multi database setup.
Before Rails 6.1, only the following tasks worked on a specific database.
But some tasks that could be applied to a specific database were missing. Let's checkout an example.
Before Rails 6.1, running a top level migration on a multi-database project, dumped the schema for all the configured databases, but if a database specific migration was run, the schema was not dumped. And there were no tasks to manually dump the schema of a specific database.
> rails db:schema:dump:primary
rails aborted!
Don't know how to build task `db:schema:dump:primary` (See the list of available tasks with `rails --tasks`)
Did you mean? db:schema:dump
Therefore, in Rails 6.1, the following database specific tasks were introduced.
Check out the pull request for more details.
If this blog was helpful, check out our full blog archive.