Jump. CredoChecks. PreferTextColumns
(Jump.CredoChecks v0.4.0)
View Source
Basics
This check is disabled by default.
Learn how to enable it via .credo.exs.
This check has a base priority of high and works with any version of Elixir.
Explanation
Ensures that Ecto migrations use :text rather than :string for column types.
In modern versions of Postgres, there is no storage or performance benefit to using textual columns with a fixed maximum length, so it is almost always preferable to not set a maximum length in the database and instead enforce max length as a business rule at the application level.
Check-Specific Parameters
There are no specific parameters for this check.
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs config file.