phoenix_ecto
phoenix_ecto copied to clipboard
Add prefix option to check repo status plug
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.