Question about Rails 6 multiple databases support

Does Rails 6 support multiple databases with different database schemas?

Rails 6 introduced support for multiple databases with this PR https://github.com/rails/rails/pull/34052

I want to know if it’s possible to have 2 databases with different structure as below

base_schema.rb ActiveRecord::Schema.define(version: 2019) do create_table “create_users” do |t| t.string “name” end end

animals_schema.rb ActiveRecord::Schema.define(version: 2019) do create_table “create_dogs” do |t| t.string “fur_color” end end

In case anyone is still interested in this.

According to @eileencodes , Rails 6 does support multiple databases with different structures

In order for this to work correctly you need to specify a different migrations_path per each database like below:

config/database.yml

development: primary: migrations_paths: “db/migrate/primary” animals: migrations_paths: “db/migrate/animals”

``

There is an open issue to improve documentation for this https://github.com/rails/rails/issues/36205