Ash FrameworkAF
Ash Frameworkโ€ข5mo agoโ€ข
16 replies
DePIN Ninja

Migrations are applied incorrectly with multiple repos

Hi all ๐Ÿ‘‹, Iโ€™m working on a project that uses multiple Repos to avoid pool exhaustion.

I ran into the issue described here on ElixirForum:
๐Ÿ‘‰https://elixirforum.com/t/migrations-are-applied-incorrectly-in-all-repos/61082

The recommendation there was to use the new -r flag but Iโ€™m hitting a snag:

โžœ mix ash.codegen -r DataPipelineCron.Repo --dev
Compiling 2 files (.ex)
Generated data_pipeline_cron app
Getting extensions in current project...
Running codegen for AshPostgres.DataLayer...
** (Mix) Could not invoke task "ash_postgres.generate_migrations": 1 error found!
-r : Unknown option

Looking at https://hexdocs.pm/ash_postgres/Mix.Tasks.AshPostgres.GenerateMigrations.html I see the the generator no longer accepts this flag.

My question:
๐Ÿ‘‰ Whatโ€™s the proper way to use ash.codegen with multiple repos to avoid duplicate migrations?

Thanks in advance ๐Ÿ™
Elixir Programming Language Forum
In my system Iโ€™m adding a second repo to connect. To do that I did the following changes: config/config.exs config :marketplace, Marketplace.ApRepo, username: "postgres", password: "postgres", hostname: "localhost", database: "ap_dev", port: 5432, show_sensitive_data_on_connection_error: true, pool_size: 10 lib/ap_repo.ex def...
Migrations are applied incorrectly in all repos
Was this page helpful?