@@ -178,6 +178,7 @@ class Product < ActiveRecord::Base
field :color_name
field :relate_product_id
field :show_flag
+ field :live
field :created_at
field :updated_at
end
@@ -237,6 +238,7 @@ class Product < ActiveRecord::Base
@@ -292,6 +294,7 @@ class Product < ActiveRecord::Base
@@ -50,4 +50,5 @@ zh-CN:
size_name: 规格一
color_name: 规格二
relate_product_id: 关联主商品
- show_flag: 主商品标记
+ show_flag: 主商品标记
+ live: 是否直播
@@ -20,10 +20,13 @@ class CreateLiveBroads < ActiveRecord::Migration
t.timestamps
add_index :live_broads, :room_id
+ add_column :products, :live, :boolean, :default=>false
def down
drop_table :live_broads
+ remove_column :products, :live
+