Skip to content

Commit

Permalink
Merge pull request #2308 from mamhoff/explicitly-store-data
Browse files Browse the repository at this point in the history
Explicitly set "store" for MariaDB
  • Loading branch information
tvdeyen committed Apr 26, 2022
1 parent 6b38c00 commit 9b393c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/alchemy/ingredient.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ class DefinitionError < StandardError; end

include Hints

# MariaDB needs to be told explicitly to use `data` as a JSON store. All other databases
# can do this natively.
store :data, coder: JSON

self.table_name = "alchemy_ingredients"

belongs_to :element, touch: true, class_name: "Alchemy::Element", inverse_of: :ingredients
Expand Down

0 comments on commit 9b393c2

Please sign in to comment.