|
|
@@ -38,12 +38,14 @@ class CreateProductAttrs < ActiveRecord::Migration
|
|
|
|
|
|
add_index :product_attr_configs, :product_id
|
|
|
add_index :product_attr_configs, :attr_key_id
|
|
|
- add_column :products, :size_id, :integer
|
|
|
- add_column :products, :color_id, :integer
|
|
|
+ add_column :products, :size_id, :integer,:default => 0,:limit => 8
|
|
|
+ add_column :products, :color_id, :integer,:default => 0,:limit => 8
|
|
|
add_column :products, :relate_product_id, :integer
|
|
|
- add_column :products, :show_flag, :boolean
|
|
|
- add_column :order_details, :size_name, :string
|
|
|
- add_column :order_details, :color_name, :string
|
|
|
+ add_column :products, :show_flag, :boolean,:limit => 8
|
|
|
+ add_column :order_details, :size_name,:string,:limit => 128
|
|
|
+ add_column :order_details, :color_name,:string,:limit => 128
|
|
|
+ add_index :products, :size_id
|
|
|
+ add_index :products, :color_id
|
|
|
end
|
|
|
|
|
|
def down
|