Skip to content
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

Default should accept boolean values #25

Open
cocoabythefire opened this issue Nov 22, 2015 · 1 comment
Open

Default should accept boolean values #25

cocoabythefire opened this issue Nov 22, 2015 · 1 comment

Comments

@cocoabythefire
Copy link

I'd like to be able to initialize a boolean field with a default value of true or false but it currently only allows numbers or strings for defaults.

So I would like to be able to write:

table.bool('myProperty').default(true);
@wbyoung
Copy link
Owner

wbyoung commented Nov 30, 2015

This does seem like a valid case to handle. Without trying anything, my only concern would be surrounding comparability and whether all databases can handle a bool directly or if they can all handle a default of 1/0 for a boolean column.

I haven't been all that active on this project recently, but a PR would be welcome. 😄

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

No branches or pull requests

2 participants