Ash FrameworkAF
Ash Framework4mo ago
5 replies
aidalgol

mix ash.codegen not detecting changes

I have just created a new project, added two resources to a new domain with mix ash.gen.resource, and mix ash.codegen is says No changes detected, so no migrations or snapshots have been created. I am also getting a strange compiler warning about redefined modules, which makes me suspect something has gone wrong with the generators.
❯ mix ash.gen.domain ChocolateMusicPlayer.Collection; mix ash.gen.resource ChocolateMusicPlayer.Collection.Track --default-actions read,create --uuid-primary-key id --attribute length:integer:public --attribute number:integer:public --attribute position:integer:public --attribute title:string:public; mix ash.gen.resource ChocolateMusicPlayer.Collection.Release --default-actions read,create --uuid-primary-key id --attribute date:date:public --attribute title:string:public --relationship has_many:tracks:ChocolateMusicPlayer.Collection.Track

Diffs look fine. I accept each Proceed with changes? prompt.
I then manually add a corresponding belongs_to relationship to Track.
Solution
do you have AshPostgres.DataLayer in your resources? you probably need to add --extend postgres
Was this page helpful?