use case-insensitive sql query

This commit is contained in:
Andy Brett
2020-10-15 07:55:19 -07:00
parent 84eb8e964d
commit ca24068d37

View File

@@ -1,7 +1,7 @@
class UpdateWeightCalculators < ActiveRecord::Migration
def change
Spree::Calculator.connection.execute(
"UPDATE spree_preferences SET key = replace( key, 'per_kg', 'per_unit') WHERE key like '/calculator/weight/per_kg/%'"
"UPDATE spree_preferences SET key = replace( key, 'per_kg', 'per_unit') WHERE key ilike '/calculator/weight/per_kg/%'"
)
Calculator::Weight.all.each { |calculator|