How do we seed data of a specific resource?
I want to add admin user by default through seeds
2 Replies
I like to use
priv/repo/seeds.exs
to seed data. Here's an example:
You can seed the data with the command mix run priv/repo/seeds.exs
Sidenote: I always use mix ash_postgres.drop && mix ash_postgres.create && mix ash_postgres.migrate && mix run priv/repo/seeds.exs
to get me a clean sheet during development.Thank you