phoenix_ecto icon indicating copy to clipboard operation
phoenix_ecto copied to clipboard

Support multiple repos on sandbox plug API

Open Cowa opened this issue 2 years ago • 0 comments

Fix issue https://github.com/phoenixframework/phoenix_ecto/issues/154

This add the support of multiple repos to the sandbox plug API:

plug(Phoenix.Ecto.SQL.Sandbox,
    at: "/sandbox",
    repo: [MyApp.Repo1, MyApp.Repo2],
    timeout: 60_000,
)

There should be no breaking changes. I reused the repo option and wrap it in a list if needed.

But maybe having a repos option would be better? While still supporting the other one.

Cowa avatar Jun 09 '22 09:06 Cowa