ash-project / ash_postgres

The PostgreSQL data layer for Ash Framework
https://hexdocs.pm/ash_postgres
MIT License
138 stars 72 forks source link

Migration example does not work for multi tenancy #407

Open cinoss opened 1 day ago

cinoss commented 1 day ago

Describe the bug https://hexdocs.pm/ash_postgres/migrations-and-tasks.html#running-migrations-in-production

    path =
      "priv/"
      |> Path.join(repo_name)
      |> Path.join("tenant_migrations")

This seems to be similar to https://github.com/elixir-ecto/ecto_sql/blob/v3.12.1/lib/ecto/migrator.ex#L194 but the app path part is missing.

we can update the doc to use Ecto.Migrator.migrations_path instead

zachdaniel commented 1 day ago

👍 would you be interested in PRing a change here? Want to also verify that the code is working in a real example before updating.