Sha256: 1143290653624bf2c164bd11282e016b89f600b462345745ed5ebf54cae7f37b
Contents?: true
Size: 390 Bytes
Versions: 6
Compression:
Stored size: 390 Bytes
Contents
# This migration comes from spree (originally 20140709160534) class BackfillLineItemPreTaxAmount < ActiveRecord::Migration def change # set pre_tax_amount to discounted_amount - included_tax_total execute(<<-SQL) UPDATE spree_line_items SET pre_tax_amount = ((price * quantity) + promo_total) - included_tax_total WHERE pre_tax_amount IS NULL; SQL end end
Version data entries
6 entries across 6 versions & 3 rubygems