mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-10 03:30:22 +00:00
Add migration to add fee estimate fields to subscriptions table
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
class AddShippingFeeEstimateAndPaymentFeeEstimateToSubscription < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :subscriptions, :shipping_fee_estimate, :decimal, :precision => 8, :scale => 2
|
||||
add_column :subscriptions, :payment_fee_estimate, :decimal, :precision => 8, :scale => 2
|
||||
end
|
||||
end
|
||||
24
db/schema.rb
24
db/schema.rb
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20180204235108) do
|
||||
ActiveRecord::Schema.define(:version => 20180222231639) do
|
||||
|
||||
create_table "account_invoices", :force => true do |t|
|
||||
t.integer "user_id", :null => false
|
||||
@@ -212,6 +212,7 @@ ActiveRecord::Schema.define(:version => 20180204235108) do
|
||||
t.string "description"
|
||||
t.text "long_description"
|
||||
t.boolean "is_primary_producer"
|
||||
t.string "contact_name"
|
||||
t.string "phone"
|
||||
t.string "website"
|
||||
t.string "twitter"
|
||||
@@ -247,7 +248,6 @@ ActiveRecord::Schema.define(:version => 20180204235108) do
|
||||
t.text "invoice_text"
|
||||
t.boolean "display_invoice_logo", :default => false
|
||||
t.boolean "allow_order_changes", :default => false, :null => false
|
||||
t.string "contact_name"
|
||||
t.boolean "enable_subscriptions", :default => false, :null => false
|
||||
end
|
||||
|
||||
@@ -1104,20 +1104,22 @@ ActiveRecord::Schema.define(:version => 20180204235108) do
|
||||
add_index "subscription_line_items", ["variant_id"], :name => "index_subscription_line_items_on_variant_id"
|
||||
|
||||
create_table "subscriptions", :force => true do |t|
|
||||
t.integer "shop_id", :null => false
|
||||
t.integer "customer_id", :null => false
|
||||
t.integer "schedule_id", :null => false
|
||||
t.integer "payment_method_id", :null => false
|
||||
t.integer "shipping_method_id", :null => false
|
||||
t.integer "shop_id", :null => false
|
||||
t.integer "customer_id", :null => false
|
||||
t.integer "schedule_id", :null => false
|
||||
t.integer "payment_method_id", :null => false
|
||||
t.integer "shipping_method_id", :null => false
|
||||
t.datetime "begins_at"
|
||||
t.datetime "ends_at"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "bill_address_id", :null => false
|
||||
t.integer "ship_address_id", :null => false
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "bill_address_id", :null => false
|
||||
t.integer "ship_address_id", :null => false
|
||||
t.datetime "canceled_at"
|
||||
t.datetime "paused_at"
|
||||
t.integer "credit_card_id"
|
||||
t.decimal "shipping_fee_estimate", :precision => 8, :scale => 2
|
||||
t.decimal "payment_fee_estimate", :precision => 8, :scale => 2
|
||||
end
|
||||
|
||||
add_index "subscriptions", ["bill_address_id"], :name => "index_subscriptions_on_bill_address_id"
|
||||
|
||||
Reference in New Issue
Block a user