From 330c62716cce6d24783319f40b0c9907bb81526e Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Thu, 2 Aug 2012 13:15:17 +1000 Subject: [PATCH] Add fields for group buy feature --- db/migrate/20120802031147_add_group_buy_fields.rb | 6 ++++++ db/schema.rb | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20120802031147_add_group_buy_fields.rb diff --git a/db/migrate/20120802031147_add_group_buy_fields.rb b/db/migrate/20120802031147_add_group_buy_fields.rb new file mode 100644 index 0000000000..5cc9efe857 --- /dev/null +++ b/db/migrate/20120802031147_add_group_buy_fields.rb @@ -0,0 +1,6 @@ +class AddGroupBuyFields < ActiveRecord::Migration + def change + add_column :spree_products, :group_buy, :boolean + add_column :spree_line_items, :max_quantity, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index 334400b91a..e5391fcccc 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120702020402) do +ActiveRecord::Schema.define(:version => 20120802031147) do create_table "distributors", :force => true do |t| t.string "name" @@ -180,10 +180,11 @@ ActiveRecord::Schema.define(:version => 20120702020402) do create_table "spree_line_items", :force => true do |t| t.integer "order_id" t.integer "variant_id" - t.integer "quantity", :null => false - t.decimal "price", :precision => 8, :scale => 2, :null => false + t.integer "quantity", :null => false + t.decimal "price", :precision => 8, :scale => 2, :null => false t.datetime "created_at" t.datetime "updated_at" + t.integer "max_quantity" end add_index "spree_line_items", ["order_id"], :name => "index_line_items_on_order_id" @@ -366,6 +367,7 @@ ActiveRecord::Schema.define(:version => 20120702020402) do t.datetime "updated_at" t.integer "count_on_hand", :default => 0, :null => false t.integer "supplier_id" + t.boolean "group_buy" end add_index "spree_products", ["available_on"], :name => "index_products_on_available_on"