# `Mailglass.Credo.NoSchemaPrefixAttribute`
[🔗](https://github.com/szTheory/mailglass/blob/v2.7.0/credo_checks/no_schema_prefix_attribute.ex#L1)

## Basics

> #### This check is disabled by default. {: .neutral}
>
> [Learn how to enable it](`e:credo:config_file.html#checks`) via `.credo.exs`.

This check has a base priority of `high` and works with any version of Elixir.

## Explanation

Modules under `lib/mailglass/` must not declare a `@schema` `@prefix`
module attribute (the Ecto read-side schema-prefix attribute).

mailglass resolves the Postgres schema at RUNTIME through the facade
(`Mailglass.Config.schema/0`), which injects the prefix into every
Repo call and migration. A compile-time attribute pins the read side to a
single baked-in schema and inverts the read-vs-write prefix precedence
that the runtime facade guarantees (decision 6): reads would resolve
against the attribute value while writes/migrations resolve against
`Mailglass.Config.schema/0`. Delete the attribute and let the facade inject the
prefix.

## Check-Specific Parameters

Use the following parameters to configure this check:

### `:included_path_prefixes`

  Only files in these path prefixes are linted.

*This parameter defaults to* `["lib/mailglass/"]`.

## General Parameters

Like with all checks, [general params](`e:credo:check_params.html`) can be applied.

Parameters can be configured via the [`.credo.exs` config file](`e:credo:config_file.html`).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
