Skip to content

3-state boolean columns emphasis on NOT NULL constraint #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

armandmgt
Copy link
Owner

As discussed in rubocop#343, the problem of 3-state boolean columns comes from the nullability of the column.

This PR adds emphasis on this. Default values are only required when adding a column to an existing table so create_table :users { |t| t.boolean :active, null: false } is completely valid.

@armandmgt armandmgt self-assigned this Jan 14, 2025
@armandmgt armandmgt closed this Jan 14, 2025
@armandmgt armandmgt deleted the 3-state-boolean-column branch January 14, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant