Skip to content

Multiple databases v2#454

Open
calebhearth wants to merge 2 commits intomainfrom
multidb-and-views-paths
Open

Multiple databases v2#454
calebhearth wants to merge 2 commits intomainfrom
multidb-and-views-paths

Conversation

@calebhearth
Copy link
Contributor

Add quite a bit more testing to the multiple databases feature, especially
around configuraiton, definition, and statement routing. Introduce a new
FakeAdapter class to let us test against a non-Postgres adapter without having a
dependency on any of the various actual adapters out there (we love you, but we
don't want a cyclic dependency!)

  • Rework the new README changes to somewhat closer match the cheeky style of the
    original.
  • Fix array handling for migrations_paths. Rails lets us define a
    :migrations_paths key that can be an array or a string in database.yml,
    and we previously ignored the possibility of that being an array. New
    functionality matches what Rails does.

Introduce configurable view paths! I'm hopeful that a lot of folks will be happy
with this. You can configure this with views_paths in database.yml and it
should default similarly to how migrations do to db/<database_name>_views/ for
non-default databases.

Fix: #291
Fix: #380
Fix: #261
Resolves: #402
Closes: #451

dnamsons and others added 2 commits November 14, 2025 14:28
Add quite a bit more testing to the multiple databases feature, especially
around configuraiton, definition, and statement routing. Introduce a new
FakeAdapter class to let us test against a non-Postgres adapter without having a
dependency on any of the various actual adapters out there (we love you, but we
don't want a cyclic dependency!)

- Rework the new README changes to somewhat closer match the cheeky style of the
  original.
- Fix array handling for migrations_paths. Rails lets us define a
  `:migrations_paths` key that can be an array or a string in `database.yml`,
  and we previously ignored the possibility of that being an array. New
  functionality matches what Rails does.

Introduce configurable view paths! I'm hopeful that a lot of folks will be happy
with this. You can configure this with `views_paths` in `database.yml` and it
should default similarly to how migrations do to `db/<database_name>_views/` for
non-default databases.

Fix: #291
Fix: #380
Fix: #261
@calebhearth
Copy link
Contributor Author

@dnamsons @leoplct @joshfester Would you like to give this a shot for the multiple dbs and/or adapters implementation?

@sullerandras @smdern @coding-chimp @MarcReniu @tomasc @huarmenta @vladimirtemnikov @nathanpalmer @jdno @shageman @hlascelles and probably others, this may also get us closer to some of the various Engines and configurable db/views paths needs so I'd love to get input on that as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants