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

add_presence_constraint breaks when data type of column is jsonb #29

Open
kelvintyb opened this issue Oct 26, 2017 · 1 comment
Open

Comments

@kelvintyb
Copy link

Encountered this bug when using rein to add a presence constraint on a column that is using the data type jsonb. Screenshot of the error message is as follows:

image 2017-10-26 at 11 31 34 am

From looking at the source code, I believe the issue stems from the method below where there is a comparison of the column with a regex matcher checking for whitespace string characters which results in a type casting error.

image 2017-10-26 at 11 36 28 am

@nullobject
Copy link
Owner

Thanks @kelvintyb, maybe it doesn't make sense to add a presence constraint to a JSONB column. Apart from checking it's not null, how would you verify it is "present"?

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