mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
use case-insensitive sql query
This commit is contained in:
@@ -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|
|
||||
|
||||
Reference in New Issue
Block a user