Add is_default attribute to Spree::CreditCard model

This commit is contained in:
Rob Harrington
2018-04-18 13:06:55 +10:00
parent d4e0d14fe1
commit 3619ec0dc8
2 changed files with 9 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
class AddIsDefaultToCreditCard < ActiveRecord::Migration
def change
add_column :spree_credit_cards, :is_default, :boolean, default: false
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20180316034336) do
ActiveRecord::Schema.define(:version => 20180418025217) do
create_table "account_invoices", :force => true do |t|
t.integer "user_id", :null => false
@@ -490,12 +490,13 @@ ActiveRecord::Schema.define(:version => 20180316034336) do
t.string "start_year"
t.string "issue_number"
t.integer "address_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "gateway_customer_profile_id"
t.string "gateway_payment_profile_id"
t.integer "user_id"
t.integer "payment_method_id"
t.boolean "is_default", :default => false
end
add_index "spree_credit_cards", ["payment_method_id"], :name => "index_spree_credit_cards_on_payment_method_id"