MG09 — Prefer text to char(n)/varchar(n)
Group: Migration safety · Auto-fixable: yes
In PostgreSQL char(n) and varchar(n) have no storage or performance advantage over text, and the length limit becomes a migration hazard — widening it later can rewrite the table. Use text and enforce length with a CHECK if needed.
Example
Section titled “Example”bad: name varchar(255)good: name textConfigure
Section titled “Configure”Disable this rule in banshee.toml:
[lint]exclude = ["MG09"]Or silence one line with -- noqa: MG09. See Linting.