Skip to content

nullable-boolean-field (TP017)#

Automatic fix is available.

What it does#

Checks for usage of numeric with precision.

Why not?#

3 possible values is not a boolean. By allowing nulls in a boolean field, you are turning an intended binary representation (true/false) into a ternary representation (true, false, null). Null is neither 'true' nor 'false'. Allowing nulls in a boolean field is an oversight that leads to unnecessarily ambiguous data.

When should you?#

Never.

Use instead:#

boolean with not null constraint.