ash-project / ash_sqlite

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

ash.gen.resource with table #107

Open flip111 opened 2 weeks ago

flip111 commented 2 weeks ago

When running ash.gen.resource a second time (for another model) I got an error about the first model and a solution to fix this

For example:

sqlite do
  table "the_table"
  repo YourApp.Repo
end

the solution is good, but couldn't ash.gen.resource generate this in the first place? Perhaps a new --table flag can be added. Or come up with a table name similar to the name of the resource

zachdaniel commented 5 days ago

I believe this is just a missing callback which can be copied from ash_postgres which does this automatically.