Merging master branch into require_standard_variant

This commit is contained in:
Rob Harrington
2015-04-29 14:30:49 +10:00
33 changed files with 280 additions and 119 deletions

View File

@@ -0,0 +1,5 @@
class AddInheritsPropertiesToProduct < ActiveRecord::Migration
def change
add_column :spree_products, :inherits_properties, :boolean, null: false, default: true
end
end

View File

@@ -0,0 +1,9 @@
class AddDefaultAndNotNullToProducerPropertiesPosition < ActiveRecord::Migration
def change
ProducerProperty.where(position: nil).each do |producer_property|
producer_property.update_attribute(:position, 0)
end
change_column :producer_properties, :position, :integer, null: false, default: 0
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 => 20150410043302) do
ActiveRecord::Schema.define(:version => 20150424025907) do
create_table "adjustment_metadata", :force => true do |t|
t.integer "adjustment_id"
@@ -373,9 +373,9 @@ ActiveRecord::Schema.define(:version => 20150410043302) do
t.string "value"
t.integer "producer_id"
t.integer "property_id"
t.integer "position"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "position", :default => 0, :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "producer_properties", ["position"], :name => "index_producer_properties_on_position"
@@ -766,6 +766,7 @@ ActiveRecord::Schema.define(:version => 20150410043302) do
t.string "variant_unit_name"
t.text "notes"
t.integer "primary_taxon_id", :null => false
t.boolean "inherits_properties", :default => true, :null => false
end
add_index "spree_products", ["available_on"], :name => "index_products_on_available_on"