Ingredients and MariaDB don't work well together #2304
mamhoff
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Steps to reproduce
Try using any
Alchemy::Ingredient
with a MariaDB database. You'll get an error such as:Expected behavior
The upgrader should create ingredients.
Reasons
MariaDB differs from MySQL in that they do not provide a native JSON datatype, and thus Rails does not know that the
data
column is, in fact, a JSON column. You can fix it by modifying theAlchemy::Ingredient
class as such:We can't do this globally, because for MySQL and Postgres this is not necessary and will generate a bunch of warnings.
It is also hard to do conditionally, because we do not want to access the database on app startup.
System configuration
Beta Was this translation helpful? Give feedback.
All reactions