ash icon indicating copy to clipboard operation
ash copied to clipboard

Community suggestions for documentation overhaul

Open zachdaniel opened this issue 1 year ago • 3 comments

Please comment here with any suggestions, and we will discuss/add to the board

zachdaniel avatar Apr 08 '24 12:04 zachdaniel

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.

frankdugan3 avatar Apr 25 '24 18:04 frankdugan3

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.


  1. user many-many orgs through user_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


  1. artist many-many album through artist_album album many-many songs through album_songs

A. create_song_with_artist_and_album -> takes song attributes and artist_id, album_id to manage those

TwistingTwists avatar Apr 27 '24 17:04 TwistingTwists

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.

bhanuvrat avatar Apr 30 '24 06:04 bhanuvrat

Thank you all for your feedback, it has been incorporated in the appropriate places.

zachdaniel avatar May 10 '24 02:05 zachdaniel