You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not quite sure why it's necessary for booleans to have a default value. Obviously when you are adding a boolean column to an existing table it may be required, because adding non-null columns requires a default in most cases. A newly created table however doesn't have a technical need for a default value for non-null tables, and it seems entirely plausible for a column not to have a good default value (whether it's an integer/string or as in this case a boolean).
The text was updated successfully, but these errors were encountered:
#43 is about where to add a default if you want to add one. I don't want to add one, but I do think a lint about booleans not being nullable is sensible, adding a requirement for a default value in that same lint makes it difficult to use when you do not want a default value .
#275 doesn't seem to have any discussion about why requiring a default would be part of the lint that requires a boolean to be not-null. The linked blog post points out what I also pointed out: a default is required when adding a column to an existing table with existing rows, that is guaranteed to be not the case when you are adding a boolean column with create_table.
I don't really understand what #337 has to do with default values (boolean or otherwise).
I'm not quite sure why it's necessary for booleans to have a default value. Obviously when you are adding a boolean column to an existing table it may be required, because adding non-null columns requires a default in most cases. A newly created table however doesn't have a technical need for a default value for non-null tables, and it seems entirely plausible for a column not to have a good default value (whether it's an integer/string or as in this case a boolean).
The text was updated successfully, but these errors were encountered: