mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-03 02:21:33 +00:00
Add tax total fields to spree_orders
This commit is contained in:
14
db/migrate/20210123044336_add_tax_totals_to_order.rb
Normal file
14
db/migrate/20210123044336_add_tax_totals_to_order.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class AddTaxTotalsToOrder < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :spree_orders, :included_tax_total, :decimal,
|
||||
precision: 10, scale: 2, null: false, default: 0.0
|
||||
|
||||
add_column :spree_orders, :additional_tax_total, :decimal,
|
||||
precision: 10, scale: 2, null: false, default: 0.0
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :spree_orders, :included_tax_total
|
||||
remove_column :spree_orders, :additional_tax_total
|
||||
end
|
||||
end
|
||||
@@ -574,6 +574,8 @@ ActiveRecord::Schema.define(version: 20210203215049) do
|
||||
t.string "last_ip_address", limit: 255
|
||||
t.integer "customer_id"
|
||||
t.integer "created_by_id"
|
||||
t.decimal "included_tax_total", precision: 10, scale: 2, default: 0.0, null: false
|
||||
t.decimal "additional_tax_total", precision: 10, scale: 2, default: 0.0, null: false
|
||||
end
|
||||
|
||||
add_index "spree_orders", ["completed_at", "user_id", "created_by_id", "created_at"], name: "spree_orders_completed_at_user_id_created_by_id_created_at_idx", using: :btree
|
||||
|
||||
Reference in New Issue
Block a user