phoenix_ecto icon indicating copy to clipboard operation
phoenix_ecto copied to clipboard

Add prefix option to check repo status plug

Open stevehodgkiss opened this issue 4 months ago • 0 comments

When developing an app that uses schema-based multi-tenancy, it would be useful to be able to configure another CheckRepoStatus plug for a named "dev" tenant:

    plug Phoenix.Ecto.CheckRepoStatus, otp_app: :myapp

    plug Phoenix.Ecto.CheckRepoStatus,
      otp_app: :myapp,
      migration_paths: &Myapp.Release.tenant_migrations_path/1,
      prefix: "tenant_acme"

migration_opts has been add to PendingMigrationError, so the configured prefix and migration_lock options are used when the "Run migrations for repo" action is triggered.

stevehodgkiss avatar Oct 21 '24 03:10 stevehodgkiss