From 29922d4be992854318c8bfe62434d8275e3575de Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Wed, 11 Apr 2018 09:54:43 +1000 Subject: [PATCH] Add allow_charges field to Customer model --- .../20180406045821_add_charges_allowed_to_customers.rb | 5 +++++ db/schema.rb | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20180406045821_add_charges_allowed_to_customers.rb diff --git a/db/migrate/20180406045821_add_charges_allowed_to_customers.rb b/db/migrate/20180406045821_add_charges_allowed_to_customers.rb new file mode 100644 index 0000000000..4503dc87b6 --- /dev/null +++ b/db/migrate/20180406045821_add_charges_allowed_to_customers.rb @@ -0,0 +1,5 @@ +class AddChargesAllowedToCustomers < ActiveRecord::Migration + def change + add_column :customers, :allow_charges, :boolean, default: false, null: false + end +end diff --git a/db/schema.rb b/db/schema.rb index 787c37c227..caad9f27a5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -79,15 +79,16 @@ ActiveRecord::Schema.define(:version => 20180418025217) do add_index "coordinator_fees", ["order_cycle_id"], :name => "index_coordinator_fees_on_order_cycle_id" create_table "customers", :force => true do |t| - t.string "email", :null => false - t.integer "enterprise_id", :null => false + t.string "email", :null => false + t.integer "enterprise_id", :null => false t.string "code" t.integer "user_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.integer "bill_address_id" t.integer "ship_address_id" t.string "name" + t.boolean "allow_charges", :default => false, :null => false end add_index "customers", ["bill_address_id"], :name => "index_customers_on_bill_address_id"