Hi, I’m building a multi-tenant app using prefixes. I wish to seed data on a given prefix using two different ways:
using the command: mix run priv/repo/seeds.exs
in the application on tenant creation.
Everytime I run the seed it only executes on the public schema. Is there a means of passing the tenant (prefix) as parameter to the CLI like the case of migrations? mix ecto.migrate --prefix="tenant"
Old post but seeding involves running the seed.exs. Within said file will need to be the data as list, kwl, map, or a uri to the data source and some Enumeration call with nested function that is used to process and insert the data into the chosen db tables.
You can use query prefix options directly in the insert call to target the specific tenant for seeding.