Naming convention for boolean columns
vanillajonathan opened this issue · 3 comments
vanillajonathan commented
How should boolean columns be named?
Should they have any prefix or suffix such as "has", "can", "is" or should that be avoided?
Example "admin" could be "is_admin".
treffynnon commented
I wouldn't include the prefix here. The column type is clear that there are only two possible values - true
and false
- so I would call the column admin
or enabled
or whatever.
vanillajonathan commented
Okay, but date columns have the "date" suffix which could be argued that isn't needed since it should be clear what values are possible because of the column type.
treffynnon commented
Agreed. That is there for compatibility with the book from memory.