Community suggestions for documentation overhaul
Please comment here with any suggestions, and we will discuss/add to the board
For AshPostgres, in the Migrations guide, at the end in the mix tasks section, it would be nice to have a nice copy & paste block of recommended replacement mix aliases to support typical workflows. Especially to Ash newbies, it can be a lot to take in to figure out what aliases would make sense and which commands to replace in the existing aliases.
I suspect this would also eliminate some support burden caused when users are handrolling their aliases and forget to change one the the ecto.* commands to ash_postgres., or don't realize they need to also add in --tenants variants too.
I think there is a need for a 'showcase' repo / livebook depicting various use cases for many-many relationships. especially, showcasing manage_relationship -- that is most common use case where I get stuck frequently.
Here are a few scenarios I have come across. Feel free to add more to the list.
- user many-many orgs
throughuser_orgs
user_orgs has keys :user_role + user_id + org_id
A. when deleting user -> delete from user_orgs but don't delete orgs
B. when deleting user -> also delete user_orgs and orgs
C. when creating user -> also create org and pass the user_role in manage_relationship
- artist many-many album
throughartist_album album many-many songsthroughalbum_songs
A. create_song_with_artist_and_album -> takes song attributes and artist_id, album_id to manage those
It took me some time to realize that relationships and references serve different purposes. Perhaps make it a little harder for new comers to ignore their purpose and the place where they have to be defined.
Thank you all for your feedback, it has been incorporated in the appropriate places.