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
Enum in migration not working (Postgres) #359
Comments
Actually no. This is the proper way to create enums in Postgres we can do:
|
Another way all in one line and probably easier is to do this: create table users11(
genders VARCHAR(255) CHECK (genders = 'male' OR genders = 'female')
); This just involves changing the |
Lastly we can also do this. This requires to smallest change: create table users12(
genders VARCHAR(255) CHECK (genders IN ('male', 'female'))
); This just requires adding |
postgres has so many damn ways to do this |
This seems the better way:
I have a postgres installed, I can test against a database this behavior. Or do you think define this as a |
no this needs to be fixed ASAP |
Fixed in #363 |
Describe the bug
A migration using enum type in postgres database isn't working.
To Reproduce
table.enum('gender', ['male', 'female'])
Expected behavior
Constraint check is have to create normally.
Screenshots
What database are you using?
Postgres
The text was updated successfully, but these errors were encountered: