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

Fix typo in token_hex check constraint #23

Closed
wants to merge 1 commit into from
Closed

Fix typo in token_hex check constraint #23

wants to merge 1 commit into from

Conversation

daemonsy
Copy link
Contributor

@daemonsy daemonsy commented Jun 4, 2021

There's no token column on enrollments, but there is a token_hex, so assuming this check constraint is a typo.

If that's the case, wondering how that worked? Is MySQL constraints in some versions more forgiving?

@@ -107,7 +107,7 @@ CREATE TABLE enrollments (

CHECK (topic != ''),
CHECK (push_magic != ''),
CHECK (LENGTH(token) > 0)
CHECK (LENGTH(token_hex) > 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just do it like the others — CHECK (token_hex != '') :) This was leftover from a column rename.

Copy link
Member

@jessepeterson jessepeterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See code comment :)

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.

2 participants