Add tax total fields to spree_orders

This commit is contained in:
Matt-Yorkley
2021-01-23 04:51:43 +00:00
parent 899552cfee
commit 719b65138f
2 changed files with 16 additions and 0 deletions

View 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

View File

@@ -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