"No changes detected, so no migrations or snapshots have been created."
Hi all. I am learning how to build a simple CRUD app with Ash, and for some reason
mix ash_postgres.generate_migrations
fails to pick up any migrations, even after I mix ash_postgres.drop
and rm -f priv/repo/migrations/*
to start from scratch.
Any clues as to why?13 Replies
AshPostgres uses "snapshots" to track the current state of the tables it is generating migrations for
So you'll also want to remove those 🙂
they default to
priv/repo/snapshots
IIRCI have a
priv/resource_snapshots/repo
, but no priv/repo/snapshots
Ok, now it generates the users and tokens table for ash_authentication, but not the tables based on my resourcesYou are likely missing either 1. an api in
config :your_app, :ash_apis
2. resources in the registry for an api
I think that was the problem, let me make one list and try it out
Excellent, thank you @Zach Daniel!
My pleasure 🙂
If your issue has been resolved, please add the ✅ Solved tag and close this thread by right clicking the thread in the sidebar and choosing Close Post.
For reference, besides the copy/past error I had made, I now enter the following sequence of commands in order to start from a clean slate:
Someone had a clever script for something like this
you'd want to modify it to do your
seeds.exs
as wellI nuke everything and start from scratch with my
reset.sh
containing the commands above
Trying to wrap my head around Ash, so it's easier to reset to a blank slate...👍
not sure about necro etiquette, but just wanted to add my 3am brain was struggling with this for like an hour, comparing the working and non-working resources over and over, the madness slowly rising, giddy cackles escaping my throat, etc, then i realized i simply hadn't prefixed the resources with "entry" in the non-detected registry. duh. the system didn't flag it as invalid or anything and i skimmed right over it. so check that first as extremely low-hanging fruit, future traveler.
(please kill or move this if it's inappropriate here)
oh man, thats crazy lol. Thanks for adding that context!