Skip to content

Mysql2::Error: BLOB, TEXT, GEOMETRY or JSON column 'metadata' can't have a default value #9

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

Open
estebanutz opened this issue Apr 8, 2025 · 0 comments

Comments

@estebanutz
Copy link

I ran into this issue while running the migrations:

Mysql2::Error: BLOB, TEXT, GEOMETRY or JSON column 'metadata' can't have a default value

I'm running rails 8.0.1, mysql2 0.5.6 gem, and my local mysql is 8.4.4 for what I found from version 8.0.13 onwards

The BLOB, TEXT, GEOMETRY, and JSON data types can be assigned a default value only if the value is written as an expression, even if the expression value is a literal.

Could it be an issue with the mysql2 gem? Any pointers, can I just remove the default values from the migration?

Thanks!

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

1 participant