Ash FrameworkAF
Ash Framework7mo ago
7 replies
jasono

ash_postgres.generate_migrations not working

It recently stopped generating migrations when there are attribute changes to resources. I get "No changes detected, so no migrations or snapshots have been created"

I upgraded ash (3.5.24), ash_postgres (2.6.9) and ash_authentication (4.9.4), etc. but it didn't help.
In fact, when I removed the "uuid_primary_key :id" line from Token and ran mix ash.codegen remove_id_from_tokens, it still insisted there is no change detected.

How can I troubleshoot this?
Solution
so Token needs to be in some domain, probably Accounts, and Accounts needs to be mentioned in :ash_domains.
# in config/config.exs
import Config

# This tells Ash about your domain, which is used to find
# available resource and actions
config :helpdesk, :ash_domains, [Helpdesk.Support]

https://hexdocs.pm/ash/get-started.html#generators
Was this page helpful?