mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-14 04:04:23 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c8aa875a0 | ||
|
|
49c8cb82c7 | ||
|
|
ef70bfdc3c |
@@ -1,5 +1,6 @@
|
|||||||
class MigrateVariantUnitValues < ActiveRecord::Migration
|
class MigrateVariantUnitValues < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
|
Spree::Variant.where(product_id: nil).destroy_all
|
||||||
Spree::Variant.where(unit_value: [nil, Float::NAN]).find_each do |variant|
|
Spree::Variant.where(unit_value: [nil, Float::NAN]).find_each do |variant|
|
||||||
variant.unit_value = 1
|
variant.unit_value = 1
|
||||||
variant.save
|
variant.save
|
||||||
|
|||||||
@@ -11,8 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
|
ActiveRecord::Schema.define(version: 20210203214304) do
|
||||||
ActiveRecord::Schema.define(version: 20210203215049) do
|
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|||||||
Reference in New Issue
Block a user