---
title: "Rails 6.1 deprecates structure:dump/load rake tasks"
description:
  "Rails 6.1 deprecates rails db:structure:dump and rails db:structure:load"
canonical_url: "https://www.bigbinary.com/blog/rails-6-1-deprecates-rails-db-structure-dump"
markdown_url: "https://www.bigbinary.com/blog/rails-6-1-deprecates-rails-db-structure-dump.md"
---

# Rails 6.1 deprecates structure:dump/load rake tasks

Rails 6.1 deprecates rails db:structure:dump and rails db:structure:load

- Author: Chetan Gawai
- Published: September 22, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 [deprecates](https://github.com/rails/rails/pull/39470)
`rails db:structure:load` and `rails db:structure:dump` tasks.

Before Rails 6.1, executing `rake db:schema:dump` would dump `db/schema.rb`
file. And executing `rake db:structure:dump` would dump `db/structure.sql` file.

Rails provides `config.active_record.schema_format` setting for which the valid
values are `:ruby` or `:sql`. However, since there are specific tasks for
`db:structure` and `db:schema` this value was not really being used.

#### Changes in Rails 6.1

In Rails 6.1 the Rails team decided to combine the two different tasks into a
single task. In Rails 6.1 `rails db:structure:dump` and
`rails db:structure:load` have been deprecated and the following message would
be shown.

```ruby
Using `bin/rails db:structure:dump` is deprecated and will be removed in Rails 6.2. Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:dump` instead.
```

Now Rails will start taking into the account value set for
`config.active_record.schema_format`.

`rails db:schema:dump` and `rails db:schema:load` would do the right thing based
on the value set for `config.active_record.schema_format`.

Check out the [pull request](https://github.com/rails/rails/pull/39470) for more
details on this.

## Links

- [Human page](https://www.bigbinary.com/blog/rails-6-1-deprecates-rails-db-structure-dump)
