joeljuca / swiss_schema

A Swiss Army knife for your Ecto schemas
https://hex.pm/packages/swiss_schema
Apache License 2.0
26 stars 4 forks source link

feat: global repo config through env `:default_repo` #24

Closed joeljuca closed 1 month ago

joeljuca commented 2 months ago

I'm picking up from #22 and completing what's left.

Closes #18.

joeljuca commented 2 months ago

Thank you @DanubioLima for working on this one!

I've raised a discussion in the Elixir Slack about how SwissSchema should accept this :default_repo config – if it should be like what we're doing today (eg: config :swiss_schema, default_repo: MyApp.Repo) or we should pull this config from the main app env (eg: config :my_app, SwissSchema, default_repo: MyApp.Repo).

I'll wait just a bit more before merging this one to make sure we're introducing a new feature with a config mechanism that's OK with Elixir standards (I'm not very familiar with these details; better safe than sorry in this case).

joeljuca commented 1 month ago

Closed by eac9e91e37964334c663a974d4e8f0b41aff03af.