ash-project / ash_sqlite

The SQLite data layer for Ash Framework.
https://hexdocs.pm/ash_sqlite
MIT License
14 stars 9 forks source link

add igniter-based AshSqlite.Install mix task #66

Closed benswift closed 4 months ago

benswift commented 4 months ago

This PR adds an igniter-based install task for ash_sqlite. I looked at the code from the equivalent ash_postgres installer task and modified to suit, so that the generated files match the ones in the getting started guide.

Currently, this command (based on the forum post)

mix igniter.new helpdesk --install iterex,ash@github:ash-project/ash,ash_sqlite@github:benswift/ash_sqlite

generates all the right files, although it also throws this error:

** (RuntimeError) must supply the --domains argument, or set `config :my_app, ash_domains: [...]` in config

(this is because by default the ash installer doesn't generate a domain). This (throwing the runtime error) is the same behaviour as the equivalent ash_postgres one-line igniter.new install.

I know this PR lands kindof out-of-the-blue, so do let me know if you'd like some changes/modifications. Happy to discuss, but I hacked this together for my own purposes (exploring ash & sqlite together) and figured it might be useful for others.

Contributor checklist

zachdaniel commented 4 months ago

awesome

zachdaniel commented 4 months ago

🚀 Thank you for your contribution! 🚀